/** * Create the lazy loader for the genotypes data, and store it in the builder * so that the VC will be able to decode on demand the genotypes data * * @param siteInfo * @param builder */ private void createLazyGenotypesDecoder( final SitesInfoForDecoding siteInfo, final VariantContextBuilder builder ) { if (siteInfo.nSamples > 0) { final LazyGenotypesContext.LazyParser lazyParser = new BCF2LazyGenotypesDecoder(this, siteInfo.alleles, siteInfo.nSamples, siteInfo.nFormatFields, builders); final LazyData lazyData = new LazyData(header, siteInfo.nFormatFields, decoder.getRecordBytes()); final LazyGenotypesContext lazy = new LazyGenotypesContext(lazyParser, lazyData, header.getNGenotypeSamples()); // did we resort the sample names? If so, we need to load the genotype data if ( !header.samplesWereAlreadySorted() ) lazy.decode(); builder.genotypesNoValidation(lazy); } }
/** * Create the lazy loader for the genotypes data, and store it in the builder * so that the VC will be able to decode on demand the genotypes data * * @param siteInfo * @param builder */ private void createLazyGenotypesDecoder( final SitesInfoForDecoding siteInfo, final VariantContextBuilder builder ) { if (siteInfo.nSamples > 0) { final LazyGenotypesContext.LazyParser lazyParser = new BCF2LazyGenotypesDecoder(this, siteInfo.alleles, siteInfo.nSamples, siteInfo.nFormatFields, builders); final LazyData lazyData = new LazyData(header, siteInfo.nFormatFields, decoder.getRecordBytes()); final LazyGenotypesContext lazy = new LazyGenotypesContext(lazyParser, lazyData, header.getNGenotypeSamples()); // did we resort the sample names? If so, we need to load the genotype data if ( !header.samplesWereAlreadySorted() ) lazy.decode(); builder.genotypesNoValidation(lazy); } }
/** * Create the lazy loader for the genotypes data, and store it in the builder * so that the VC will be able to decode on demand the genotypes data * * @param siteInfo * @param builder */ private void createLazyGenotypesDecoder( final SitesInfoForDecoding siteInfo, final VariantContextBuilder builder ) { if (siteInfo.nSamples > 0) { final LazyGenotypesContext.LazyParser lazyParser = new BCF2LazyGenotypesDecoder(this, siteInfo.alleles, siteInfo.nSamples, siteInfo.nFormatFields, builders); final LazyData lazyData = new LazyData(header, siteInfo.nFormatFields, decoder.getRecordBytes()); final LazyGenotypesContext lazy = new LazyGenotypesContext(lazyParser, lazyData, header.getNGenotypeSamples()); // did we resort the sample names? If so, we need to load the genotype data if ( !header.samplesWereAlreadySorted() ) lazy.decode(); builder.genotypesNoValidation(lazy); } }