Search in sources :

Example 21 with IndexedSampleList

use of org.broadinstitute.hellbender.utils.genotyper.IndexedSampleList in project gatk-protected by broadinstitute.

the class GenotypeGVCFs method onTraversalStart.

@Override
public void onTraversalStart() {
    final VCFHeader inputVCFHeader = getHeaderForVariants();
    if (onlyOutputCallsStartingInIntervals) {
        if (!hasIntervals()) {
            throw new CommandLineException.MissingArgument("-L or -XL", "Intervals are required if --" + ONLY_OUTPUT_CALLS_STARTING_IN_INTERVALS_FULL_NAME + " was specified.");
        }
    }
    intervals = hasIntervals() ? intervalArgumentCollection.getIntervals(getBestAvailableSequenceDictionary()) : Collections.emptyList();
    //todo should this be getSampleNamesInOrder?
    final SampleList samples = new IndexedSampleList(inputVCFHeader.getGenotypeSamples());
    genotypingEngine = new MinimalGenotypingEngine(createUAC(), samples, new GeneralPloidyFailOverAFCalculatorProvider(genotypeArgs));
    annotationEngine = VariantAnnotatorEngine.ofSelectedMinusExcluded(annotationGroupsToUse, annotationsToUse, annotationsToExclude, dbsnp.dbsnp, Collections.emptyList());
    merger = new ReferenceConfidenceVariantContextMerger();
    setupVCFWriter(inputVCFHeader, samples);
}
Also used : GeneralPloidyFailOverAFCalculatorProvider(org.broadinstitute.hellbender.tools.walkers.genotyper.afcalc.GeneralPloidyFailOverAFCalculatorProvider) IndexedSampleList(org.broadinstitute.hellbender.utils.genotyper.IndexedSampleList) SampleList(org.broadinstitute.hellbender.utils.genotyper.SampleList) IndexedSampleList(org.broadinstitute.hellbender.utils.genotyper.IndexedSampleList)

Aggregations

IndexedSampleList (org.broadinstitute.hellbender.utils.genotyper.IndexedSampleList)21 Test (org.testng.annotations.Test)13 SampleList (org.broadinstitute.hellbender.utils.genotyper.SampleList)8 GATKRead (org.broadinstitute.hellbender.utils.read.GATKRead)8 ArrayList (java.util.ArrayList)5 ReferenceContext (org.broadinstitute.hellbender.engine.ReferenceContext)4 AlleleList (org.broadinstitute.hellbender.utils.genotyper.AlleleList)4 IndexedAlleleList (org.broadinstitute.hellbender.utils.genotyper.IndexedAlleleList)4 ReadLikelihoods (org.broadinstitute.hellbender.utils.genotyper.ReadLikelihoods)4 Haplotype (org.broadinstitute.hellbender.utils.haplotype.Haplotype)4 List (java.util.List)3 BaseTest (org.broadinstitute.hellbender.utils.test.BaseTest)3 Allele (htsjdk.variant.variantcontext.Allele)2 VariantContext (htsjdk.variant.variantcontext.VariantContext)2 File (java.io.File)2 HashMap (java.util.HashMap)2 PairHMMNativeArguments (org.broadinstitute.gatk.nativebindings.pairhmm.PairHMMNativeArguments)2 UserException (org.broadinstitute.hellbender.exceptions.UserException)2 AS_RMSMappingQuality (org.broadinstitute.hellbender.tools.walkers.annotator.allelespecific.AS_RMSMappingQuality)2 GeneralPloidyFailOverAFCalculatorProvider (org.broadinstitute.hellbender.tools.walkers.genotyper.afcalc.GeneralPloidyFailOverAFCalculatorProvider)2