private final void fullyDecodeGenotypes(final VariantContextBuilder builder, final VCFHeader header) { final GenotypesContext gc = new GenotypesContext(); for ( final Genotype g : getGenotypes() ) { gc.add(fullyDecodeGenotypes(g, header)); } builder.genotypesNoValidation(gc); }
private final void fullyDecodeGenotypes(final VariantContextBuilder builder, final VCFHeader header) { final GenotypesContext gc = new GenotypesContext(); for ( final Genotype g : getGenotypes() ) { gc.add(fullyDecodeGenotypes(g, header)); } builder.genotypesNoValidation(gc); }
private final void fullyDecodeGenotypes(final VariantContextBuilder builder, final VCFHeader header) { final GenotypesContext gc = new GenotypesContext(); for ( final Genotype g : getGenotypes() ) { gc.add(fullyDecodeGenotypes(g, header)); } builder.genotypesNoValidation(gc); }
/** * Return a VC equivalent to this one but where all fields are fully decoded * * See VariantContext document about fully decoded * * @param header containing types about all fields in this VC * @return a fully decoded version of this VC */ public VariantContext fullyDecode(final VCFHeader header, final boolean lenientDecoding) { if ( isFullyDecoded() ) return this; else { // TODO -- warning this is potentially very expensive as it creates copies over and over final VariantContextBuilder builder = new VariantContextBuilder(this); fullyDecodeInfo(builder, header, lenientDecoding); fullyDecodeGenotypes(builder, header); builder.fullyDecoded(true); return builder.make(); } }
/** * Return a VC equivalent to this one but where all fields are fully decoded * * See VariantContext document about fully decoded * * @param header containing types about all fields in this VC * @return a fully decoded version of this VC */ public VariantContext fullyDecode(final VCFHeader header, final boolean lenientDecoding) { if ( isFullyDecoded() ) return this; else { // TODO -- warning this is potentially very expensive as it creates copies over and over final VariantContextBuilder builder = new VariantContextBuilder(this); fullyDecodeInfo(builder, header, lenientDecoding); fullyDecodeGenotypes(builder, header); builder.fullyDecoded(true); return builder.make(); } }
/** * Return a VC equivalent to this one but where all fields are fully decoded * * See VariantContext document about fully decoded * * @param header containing types about all fields in this VC * @return a fully decoded version of this VC */ public VariantContext fullyDecode(final VCFHeader header, final boolean lenientDecoding) { if ( isFullyDecoded() ) return this; else { // TODO -- warning this is potentially very expensive as it creates copies over and over final VariantContextBuilder builder = new VariantContextBuilder(this); fullyDecodeInfo(builder, header, lenientDecoding); fullyDecodeGenotypes(builder, header); builder.fullyDecoded(true); return builder.make(); } }