public abstract class MultiVariantWalker extends VariantWalkerBase
apply(htsjdk.variant.variantcontext.VariantContext, org.broadinstitute.hellbender.engine.ReadsContext, org.broadinstitute.hellbender.engine.ReferenceContext, org.broadinstitute.hellbender.engine.FeatureContext)
method to process each variant, and may optionally implement
GATKTool.onTraversalStart()
, GATKTool.onTraversalSuccess()
and/or GATKTool.closeTool()
.Modifier and Type | Field and Description |
---|---|
protected MultiVariantInputArgumentCollection |
multiVariantInputArgumentCollection |
DEFAULT_DRIVING_VARIANTS_LOOKAHEAD_BASES, genomicsDBOptions
addOutputSAMProgramRecord, addOutputVCFCommandLine, cloudIndexPrefetchBuffer, cloudPrefetchBuffer, createOutputBamIndex, createOutputBamMD5, createOutputVariantIndex, createOutputVariantMD5, disableBamIndexCaching, features, intervalArgumentCollection, lenientVCFProcessing, outputSitesOnlyVCFs, progressMeter, readArguments, referenceArguments, SECONDS_BETWEEN_PROGRESS_UPDATES_NAME, seqValidationArguments
GATK_CONFIG_FILE, logger, NIO_MAX_REOPENS, NIO_PROJECT_FOR_REQUESTER_PAYS, QUIET, specialArgumentsCollection, tmpDir, useJdkDeflater, useJdkInflater, VERBOSITY
Constructor and Description |
---|
MultiVariantWalker() |
Modifier and Type | Method and Description |
---|---|
abstract void |
apply(htsjdk.variant.variantcontext.VariantContext variant,
ReadsContext readsContext,
ReferenceContext referenceContext,
FeatureContext featureContext)
Process an individual variant.
|
boolean |
doDictionaryCrossValidation()
Should this tool cross-validate the sequence dictionaries for input feature files? If a large number of inputs are expected,
the tools should override to return false and require a reference.
|
protected java.util.List<FeatureInput<htsjdk.variant.variantcontext.VariantContext>> |
getDrivingVariantsFeatureInputs()
Returns a list of feature inputs used for the driving variants for this source.
|
htsjdk.variant.vcf.VCFHeader |
getHeaderForVariants()
Gets the header associated with our driving source of variants as a VCFHeader.
|
protected MultiVariantInputArgumentCollection |
getMultiVariantInputArgumentCollection()
Return an argument collection that provides the driving variants.
|
java.util.SortedSet<java.lang.String> |
getSamplesForVariants()
Get in name-sorted order a list of samples merged from the driving variants files.
|
protected htsjdk.samtools.SAMSequenceDictionary |
getSequenceDictionaryForDrivingVariants()
Return the primary sequence dictionary to be used for the driving variants for this tool.
|
protected java.util.Spliterator<htsjdk.variant.variantcontext.VariantContext> |
getSpliteratorForDrivingVariants()
Return a spliterator to be used to iterate over the elements of the driving variants.
|
protected void |
initializeDrivingVariants()
Process the feature inputs that represent the primary driving source(s) of variants for this tool, and
perform any necessary header and sequence dictionary validation.
|
protected void |
onShutdown()
Close all data sources.
|
protected void |
onStartup()
Marked final so that tool authors don't override it.
|
void |
traverse()
A complete traversal from start to finish.
|
getBestAvailableSequenceDictionary, getDrivingVariantCacheLookAheadBases, getGenomicsDBOptions, getProgressMeterRecordLabel, getTransformedVariantStream, getTransformedVariantStream, makePostVariantFilterTransformer, makePreVariantFilterTransformer, makeVariantFilter, requiresFeatures
directlyAccessEngineFeatureManager, directlyAccessEngineReadsDataSource, directlyAccessEngineReferenceDataSource
addFeatureInputsAfterInitialization, closeTool, createSAMWriter, createVCFWriter, createVCFWriter, createVCFWriter, doWork, getDefaultCloudIndexPrefetchBufferSize, getDefaultCloudPrefetchBufferSize, getDefaultReadFilters, getDefaultToolVCFHeaderLines, getDefaultVariantAnnotationGroups, getDefaultVariantAnnotations, getHeaderForFeatures, getHeaderForReads, getHeaderForSAMWriter, getMasterSequenceDictionary, getPluginDescriptors, getReferenceDictionary, getSequenceDictionaryValidationArgumentCollection, getToolName, getTransformedReadStream, getTraversalIntervals, hasFeatures, hasReads, hasReference, hasUserSuppliedIntervals, initializeProgressMeter, makePostReadFilterTransformer, makePreReadFilterTransformer, makeReadFilter, makeVariantAnnotations, onTraversalStart, onTraversalSuccess, requiresIntervals, requiresReads, requiresReference, transformTraversalIntervals, useVariantAnnotations
customCommandLineValidation, getCommandLine, getCommandLineParser, getDefaultHeaders, getMetricsFile, getSupportInformation, getToolkitName, getToolkitShortName, getToolStatusWarning, getUsage, getVersion, instanceMain, instanceMainPostParseArgs, isBetaFeature, isExperimentalFeature, parseArgs, printLibraryVersions, printSettings, printStartupMessage, runTool, setDefaultHeaders, warnOnToolStatus
@ArgumentCollection protected MultiVariantInputArgumentCollection multiVariantInputArgumentCollection
protected htsjdk.samtools.SAMSequenceDictionary getSequenceDictionaryForDrivingVariants()
VariantWalkerBase
VariantWalkerBase.initializeDrivingVariants()
getSequenceDictionaryForDrivingVariants
in class VariantWalkerBase
protected java.util.Spliterator<htsjdk.variant.variantcontext.VariantContext> getSpliteratorForDrivingVariants()
VariantWalkerBase
getSpliteratorForDrivingVariants
in class VariantWalkerBase
protected final void onStartup()
GATKTool.onTraversalStart()
instead.protected MultiVariantInputArgumentCollection getMultiVariantInputArgumentCollection()
public boolean doDictionaryCrossValidation()
protected void initializeDrivingVariants()
VariantWalkerBase
initializeDrivingVariants
in class VariantWalkerBase
protected final java.util.List<FeatureInput<htsjdk.variant.variantcontext.VariantContext>> getDrivingVariantsFeatureInputs()
public final htsjdk.variant.vcf.VCFHeader getHeaderForVariants()
getHeaderForVariants
in class VariantWalkerBase
public void traverse()
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.public abstract void apply(htsjdk.variant.variantcontext.VariantContext variant, ReadsContext readsContext, ReferenceContext referenceContext, FeatureContext featureContext)
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 invoking ReferenceContext.setWindow(int, int)
on this object before calling ReferenceContext.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).protected final void onShutdown()
GATKTool.onTraversalSuccess()
and/or
GATKTool.closeTool()
instead.onShutdown
in class GATKTool
public final java.util.SortedSet<java.lang.String> getSamplesForVariants()