Class MultiplePassVariantWalker
java.lang.Object
org.broadinstitute.hellbender.cmdline.CommandLineProgram
org.broadinstitute.hellbender.engine.GATKTool
org.broadinstitute.hellbender.engine.WalkerBase
org.broadinstitute.hellbender.engine.VariantWalkerBase
org.broadinstitute.hellbender.engine.VariantWalker
org.broadinstitute.hellbender.engine.MultiplePassVariantWalker
- All Implemented Interfaces:
org.broadinstitute.barclay.argparser.CommandLinePluginProvider
- Direct Known Subclasses:
FilterMutectCalls
,LabeledVariantAnnotationsWalker
,TwoPassVariantWalker
A VariantWalker that makes multiple passes through the variants.
This allows the user to store internal states during early passes, which the user can then
process and access during later passes
-
Nested Class Summary
Nested classes/interfaces inherited from class org.broadinstitute.hellbender.cmdline.CommandLineProgram
CommandLineProgram.AutoCloseableNoCheckedExceptions
-
Field Summary
Fields inherited from class org.broadinstitute.hellbender.engine.VariantWalker
drivingVariantFile
Fields inherited from class org.broadinstitute.hellbender.engine.VariantWalkerBase
DEFAULT_DRIVING_VARIANTS_LOOKAHEAD_BASES, genomicsDBOptions
Fields inherited from class org.broadinstitute.hellbender.engine.GATKTool
addOutputSAMProgramRecord, addOutputVCFCommandLine, cloudIndexPrefetchBuffer, cloudPrefetchBuffer, createOutputBamIndex, createOutputBamMD5, createOutputVariantIndex, createOutputVariantMD5, disableBamIndexCaching, features, intervalArgumentCollection, lenientVCFProcessing, outputSitesOnlyVCFs, progressMeter, readArguments, referenceArguments, SECONDS_BETWEEN_PROGRESS_UPDATES_NAME, seqValidationArguments
Fields inherited from class org.broadinstitute.hellbender.cmdline.CommandLineProgram
GATK_CONFIG_FILE, logger, NIO_MAX_REOPENS, NIO_PROJECT_FOR_REQUESTER_PAYS, QUIET, specialArgumentsCollection, tmpDir, useJdkDeflater, useJdkInflater, VERBOSITY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract void
afterNthPass
(int n) Process the data collected during the first pass.final void
apply
(htsjdk.variant.variantcontext.VariantContext variant, ReadsContext readsContext, ReferenceContext referenceContext, FeatureContext featureContext) Make final to hide it from subclassesprotected abstract void
nthPassApply
(htsjdk.variant.variantcontext.VariantContext variant, ReadsContext readsContext, ReferenceContext referenceContext, FeatureContext featureContext, int n) nth pass through the variants.protected abstract int
void
traverse()
Implementation of variant-based traversal.Methods inherited from class org.broadinstitute.hellbender.engine.VariantWalker
getDrivingVariantsFeatureInput, getHeaderForVariants, getSequenceDictionaryForDrivingVariants, getSpliteratorForDrivingVariants, initializeDrivingVariants, onShutdown, onStartup
Methods inherited from class org.broadinstitute.hellbender.engine.VariantWalkerBase
getBestAvailableSequenceDictionary, getDrivingVariantCacheLookAheadBases, getGenomicsDBOptions, getProgressMeterRecordLabel, getTransformedVariantStream, getTransformedVariantStream, makePostVariantFilterTransformer, makePreVariantFilterTransformer, makeVariantFilter, requiresFeatures
Methods inherited from class org.broadinstitute.hellbender.engine.WalkerBase
directlyAccessEngineFeatureManager, directlyAccessEngineReadsDataSource, directlyAccessEngineReferenceDataSource
Methods inherited from class org.broadinstitute.hellbender.engine.GATKTool
addFeatureInputsAfterInitialization, bamIndexCachingShouldBeEnabled, closeTool, createSAMWriter, createVCFWriter, createVCFWriter, createVCFWriter, disableProgressMeter, doWork, getDefaultCloudIndexPrefetchBufferSize, getDefaultCloudPrefetchBufferSize, getDefaultReadFilters, getDefaultToolVCFHeaderLines, getDefaultVariantAnnotationGroups, getDefaultVariantAnnotations, getHeaderForFeatures, getHeaderForReads, getHeaderForSAMWriter, getMasterSequenceDictionary, getPluginDescriptors, getReferenceDictionary, getSequenceDictionaryValidationArgumentCollection, getToolName, getTransformedReadStream, getTraversalIntervals, getUserSuppliedIntervals, hasFeatures, hasReads, hasReference, hasUserSuppliedIntervals, initializeProgressMeter, makePostReadFilterTransformer, makePreReadFilterTransformer, makeReadFilter, makeSamReaderFactory, makeVariantAnnotations, onTraversalStart, onTraversalSuccess, requiresIntervals, requiresReads, requiresReference, transformTraversalIntervals, useVariantAnnotations
Methods inherited from class org.broadinstitute.hellbender.cmdline.CommandLineProgram
customCommandLineValidation, getCommandLine, getCommandLineParser, getDefaultHeaders, getMetricsFile, getSupportInformation, getToolkitName, getToolkitShortName, getToolStatusWarning, getUsage, getVersion, instanceMain, instanceMainPostParseArgs, isBetaFeature, isExperimentalFeature, parseArgs, printLibraryVersions, printSettings, printStartupMessage, runTool, setDefaultHeaders, warnOnToolStatus
-
Constructor Details
-
MultiplePassVariantWalker
public MultiplePassVariantWalker()
-
-
Method Details
-
numberOfPasses
protected abstract int numberOfPasses() -
traverse
public void traverse()Implementation of variant-based traversal. NOTE: You should only overrideVariantWalker.traverse()
if you are writing a new walker base class in the engine package that extends this class. It is not meant to be overridden by tools outside of the engine package. Implementation of multiple-pass variant traversal. Overrides the default, single-pass traversal framework ofVariantWalkerBase
allowing for multiple passes. NOTE: You should only overridetraverse()
if you are writing a new walker base class in the engine package that extends this class. It is not meant to be overridden by tools outside of the engine package.- Overrides:
traverse
in classVariantWalker
-
nthPassApply
protected abstract void nthPassApply(htsjdk.variant.variantcontext.VariantContext variant, ReadsContext readsContext, ReferenceContext referenceContext, FeatureContext featureContext, int n) nth pass through the variants. The user may store data in instance variables of the walker and process them inafterNthPass(int)
before making a second pass- Parameters:
variant
- A variant record in a vcfreadsContext
- Reads overlapping the current variant. Will be empty if a read source (e.g. bam) isn't providedreferenceContext
- Reference bases spanning the current variantfeatureContext
- A record overlapping the current variant from an auxiliary data source (e.g. gnomad)n
- Which pass it is (zero-indexed)
-
afterNthPass
protected abstract void afterNthPass(int n) Process the data collected during the first pass. This method is called between the two traversals -
apply
public final void apply(htsjdk.variant.variantcontext.VariantContext variant, ReadsContext readsContext, ReferenceContext referenceContext, FeatureContext featureContext) Make final to hide it from subclasses- Specified by:
apply
in classVariantWalker
- Parameters:
variant
- Current variant being processed.readsContext
- Reads overlapping the current variant. Will be an empty, but non-null, context object if there is no backing source of reads data (in which case all queries on it will return an empty array/iterator)referenceContext
- Reference bases spanning the current variant. Will be an empty, but non-null, context object if there is no backing source of reference data (in which case all queries on it will return an empty array/iterator). Can request extra bases of context around the current variant's interval by invokingReferenceContext.setWindow(int, int)
on this object before callingReferenceContext.getBases()
featureContext
- Features spanning the current variant. Will be an empty, but non-null, context object if there is no backing source of Feature data (in which case all queries on it will return an empty List).
-