public abstract class ReferenceWalker extends WalkerBase
GATKTool.onTraversalStart()
and/or GATKTool.onTraversalSuccess()
.
Tool authors may also implement getReferenceWindow(SimpleInterval)
to provide additional bases of context
around each position.
See the ExampleReferenceWalker
walker for an example.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 |
---|
ReferenceWalker() |
Modifier and Type | Method and Description |
---|---|
abstract void |
apply(ReferenceContext referenceContext,
ReadsContext readsContext,
FeatureContext featureContext)
Process an individual reference locus (with optional contextual information).
|
java.lang.String |
getProgressMeterRecordLabel() |
protected SimpleInterval |
getReferenceWindow(SimpleInterval locus)
Determine the window to use when creating the ReferenceContext in apply.
|
protected void |
onShutdown()
Shutdown data sources.
|
protected void |
onStartup()
Initialize data sources for traversal.
|
boolean |
requiresReference()
Does this tool require reference data? Traversals types and/or tools that do should override to return true.
|
void |
traverse()
A complete traversal from start to finish.
|
directlyAccessEngineFeatureManager, directlyAccessEngineReadsDataSource, directlyAccessEngineReferenceDataSource
addFeatureInputsAfterInitialization, closeTool, createSAMWriter, createVCFWriter, createVCFWriter, createVCFWriter, doWork, getBestAvailableSequenceDictionary, getDefaultCloudIndexPrefetchBufferSize, getDefaultCloudPrefetchBufferSize, getDefaultReadFilters, getDefaultToolVCFHeaderLines, getDefaultVariantAnnotationGroups, getDefaultVariantAnnotations, getGenomicsDBOptions, getHeaderForFeatures, getHeaderForReads, getHeaderForSAMWriter, getMasterSequenceDictionary, getPluginDescriptors, getReferenceDictionary, getSequenceDictionaryValidationArgumentCollection, getToolName, getTransformedReadStream, getTraversalIntervals, hasFeatures, hasReads, hasReference, hasUserSuppliedIntervals, initializeProgressMeter, makePostReadFilterTransformer, makePreReadFilterTransformer, makeReadFilter, makeVariantAnnotations, onTraversalStart, onTraversalSuccess, requiresFeatures, requiresIntervals, requiresReads, transformTraversalIntervals, useVariantAnnotations
customCommandLineValidation, getCommandLine, getCommandLineParser, getDefaultHeaders, getMetricsFile, getSupportInformation, getToolkitName, getToolkitShortName, getToolStatusWarning, getUsage, getVersion, instanceMain, instanceMainPostParseArgs, isBetaFeature, isExperimentalFeature, parseArgs, printLibraryVersions, printSettings, printStartupMessage, runTool, setDefaultHeaders, warnOnToolStatus
public java.lang.String getProgressMeterRecordLabel()
getProgressMeterRecordLabel
in class GATKTool
ProgressMeter.DEFAULT_RECORD_LABEL
,
but tools may override to provide a more appropriate label (like "reads" or "regions")public final boolean requiresReference()
GATKTool
requiresReference
in class GATKTool
protected final void onStartup()
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.protected SimpleInterval getReferenceWindow(SimpleInterval locus)
locus
- the current locus being processed in the traversalapply(ReferenceContext, ReadsContext, FeatureContext)
public abstract void apply(ReferenceContext referenceContext, ReadsContext readsContext, FeatureContext featureContext)
referenceContext
- Reference bases at the current locus. The window around the single locus is provided by getReferenceWindow(SimpleInterval)
Additional bases my be retrieved by invoking the by invoking ReferenceContext.setWindow(int, int)
on this object before calling ReferenceContext.getBases()
, however this will not effect
the set of reads and features that are considered overlapping which are based on the preset
window passed in.readsContext
- Reads spanning the current reference window. Will be an empty, but non-null, context object
if there is no backing source of Read data (in which case all queries on it will return an
empty List).featureContext
- Features spanning the current reference window. 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()
instead.onShutdown
in class GATKTool