public abstract class VariantWalker 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 |
---|---|
GATKPath |
drivingVariantFile |
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 |
---|
VariantWalker() |
Modifier and Type | Method and Description |
---|---|
abstract void |
apply(htsjdk.variant.variantcontext.VariantContext variant,
ReadsContext readsContext,
ReferenceContext referenceContext,
FeatureContext featureContext)
Process an individual variant.
|
protected FeatureInput<htsjdk.variant.variantcontext.VariantContext> |
getDrivingVariantsFeatureInput()
Returns the feature input for the driving variants file.
|
htsjdk.variant.vcf.VCFHeader |
getHeaderForVariants()
Gets the header associated with our driving source of variants as a VCFHeader.
|
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()
Implementation of variant-based traversal.
|
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
@Argument(fullName="variant", shortName="V", doc="A VCF file containing variants", common=false, optional=false) public GATKPath drivingVariantFile
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 void initializeDrivingVariants()
VariantWalkerBase
initializeDrivingVariants
in class VariantWalkerBase
protected final FeatureInput<htsjdk.variant.variantcontext.VariantContext> getDrivingVariantsFeatureInput()
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