public String toString() { // Note: passing genotypes to String.format() will implicitly decode the genotypes // This may not be desirable, so don't decode by default return genotypes.isLazyWithData() ? toStringUnparsedGenotypes() : toStringDecodeGenotypes(); }
public String toString() { // Note: passing genotypes to String.format() will implicitly decode the genotypes // This may not be desirable, so don't decode by default return genotypes.isLazyWithData() ? toStringUnparsedGenotypes() : toStringDecodeGenotypes(); }
public String toString() { // Note: passing genotypes to String.format() will implicitly decode the genotypes // This may not be desirable, so don't decode by default return genotypes.isLazyWithData() ? toStringUnparsedGenotypes() : toStringDecodeGenotypes(); }
public List<VariantContext> convert(List<CharBuffer> block) { int size = block.size(); List<VariantContext> varList = new ArrayList<>(size); for (CharBuffer buff : block) { VariantContext ctx = convert(buff); if (decodeGenotypes) { if (ctx.getGenotypes().isLazyWithData()) { ((LazyGenotypesContext) ctx.getGenotypes()).decode(); } } varList.add(ctx); } return varList; }
if (vc.getGenotypes().isLazyWithData()) { final htsjdk.variant.variantcontext.LazyGenotypesContext gc = (htsjdk.variant.variantcontext.LazyGenotypesContext)
@Override public List<VariantContext> read(int batchSize) { List<VariantContext> variantContexts = new ArrayList<>(batchSize); while (lineIterator.hasNext() && variantContexts.size() < batchSize) { String line = lineIterator.next(); if (line.startsWith("#") || line.trim().isEmpty()) { continue; } try { VariantContext variantContext = codec.decode(line); // Lazy processing management if (!lazy && variantContext.getGenotypes().isLazyWithData()) { variantContext.getGenotype(variantContext.getGenotypes().size() - 1); } variantContext.getGenotypes(); variantContexts.add(variantContext); } catch (TribbleException e) { if (e.getMessage().startsWith("The provided VCF file is malformed at approximately line number")) { logMalformatedLine(line, e); } else { throw e; } } } return variantContexts; }
if (vc.getGenotypes().isLazyWithData()) { final htsjdk.variant.variantcontext.LazyGenotypesContext gc = (htsjdk.variant.variantcontext.LazyGenotypesContext)
if (vc.getGenotypes().isLazyWithData()) { final htsjdk.variant.variantcontext.LazyGenotypesContext gc = (htsjdk.variant.variantcontext.LazyGenotypesContext)
if (gc.isLazyWithData() && ((LazyGenotypesContext) gc).getUnparsedGenotypeData() instanceof String) { stringBuilder.append(VCFConstants.FIELD_SEPARATOR); stringBuilder.append(((LazyGenotypesContext) gc).getUnparsedGenotypeData().toString());
if (gc.isLazyWithData() && ((LazyGenotypesContext) gc).getUnparsedGenotypeData() instanceof String) { vcfOutput.append(VCFConstants.FIELD_SEPARATOR); vcfOutput.append(((LazyGenotypesContext) gc).getUnparsedGenotypeData().toString());
if (gc.isLazyWithData() && ((LazyGenotypesContext) gc).getUnparsedGenotypeData() instanceof String) { vcfOutput.append(VCFConstants.FIELD_SEPARATOR); vcfOutput.append(((LazyGenotypesContext) gc).getUnparsedGenotypeData().toString());
private BCF2Codec.LazyData getLazyData(final VariantContext vc) { if ( vc.getGenotypes().isLazyWithData() ) { final LazyGenotypesContext lgc = (LazyGenotypesContext)vc.getGenotypes(); if ( lgc.getUnparsedGenotypeData() instanceof BCF2Codec.LazyData && canSafelyWriteRawGenotypesBytes((BCF2Codec.LazyData) lgc.getUnparsedGenotypeData())) { return (BCF2Codec.LazyData)lgc.getUnparsedGenotypeData(); } else { lgc.decode(); // WARNING -- required to avoid keeping around bad lazy data for too long } } return null; }
private BCF2Codec.LazyData getLazyData(final VariantContext vc) { if ( vc.getGenotypes().isLazyWithData() ) { final LazyGenotypesContext lgc = (LazyGenotypesContext)vc.getGenotypes(); if ( lgc.getUnparsedGenotypeData() instanceof BCF2Codec.LazyData && canSafelyWriteRawGenotypesBytes((BCF2Codec.LazyData) lgc.getUnparsedGenotypeData())) { return (BCF2Codec.LazyData)lgc.getUnparsedGenotypeData(); } else { lgc.decode(); // WARNING -- required to avoid keeping around bad lazy data for too long } } return null; }
private BCF2Codec.LazyData getLazyData(final VariantContext vc) { if ( vc.getGenotypes().isLazyWithData() ) { final LazyGenotypesContext lgc = (LazyGenotypesContext)vc.getGenotypes(); if ( lgc.getUnparsedGenotypeData() instanceof BCF2Codec.LazyData && canSafelyWriteRawGenotypesBytes((BCF2Codec.LazyData) lgc.getUnparsedGenotypeData())) { return (BCF2Codec.LazyData)lgc.getUnparsedGenotypeData(); } else { lgc.decode(); // WARNING -- required to avoid keeping around bad lazy data for too long } } return null; }