public abstract class AbstractConcordanceWalker extends WalkerBase
apply(org.broadinstitute.hellbender.engine.AbstractConcordanceWalker.TruthVersusEval, org.broadinstitute.hellbender.engine.ReadsContext, org.broadinstitute.hellbender.engine.ReferenceContext)
and areVariantsAtSameLocusConcordant(htsjdk.variant.variantcontext.VariantContext, htsjdk.variant.variantcontext.VariantContext)
methods to process each variant
and may optionally implement GATKTool.onTraversalStart()
and/or GATKTool.onTraversalSuccess()
.
Created by Takuto Sato 1/30/17, abstractified by David Benjamin on 2/22/17.
GATKTool.onTraversalStart()
, GATKTool.onTraversalSuccess()
and/or GATKTool.closeTool()
.Modifier and Type | Class and Description |
---|---|
protected static class |
AbstractConcordanceWalker.TruthVersusEval
store a truth vc in case of a false negative, an eval vc in case of a false positive, or a concordance pair of
truth and eval in case of a true positive.
|
Modifier and Type | Field and Description |
---|---|
static int |
CACHE_LOOKAHEAD |
static java.lang.String |
CONFIDENCE_REGION_LONG_NAME |
static java.lang.String |
CONFIDENCE_REGION_SHORT_NAME |
protected htsjdk.samtools.SAMSequenceDictionary |
dict |
static java.lang.String |
EVAL_VARIANTS_LONG_NAME |
static java.lang.String |
EVAL_VARIANTS_SHORT_NAME |
java.lang.String |
evalVariantsFile |
protected java.io.File |
highConfidenceRegion |
static java.lang.String |
TRUTH_VARIANTS_LONG_NAME |
java.lang.String |
truthVariantsFile |
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 |
---|
AbstractConcordanceWalker() |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
apply(AbstractConcordanceWalker.TruthVersusEval truthVersusEval,
ReadsContext readsContext,
ReferenceContext refContext) |
protected abstract boolean |
areVariantsAtSameLocusConcordant(htsjdk.variant.variantcontext.VariantContext truth,
htsjdk.variant.variantcontext.VariantContext eval) |
htsjdk.samtools.SAMSequenceDictionary |
getBestAvailableSequenceDictionary()
Returns the "best available" sequence dictionary or
null if there is no single best dictionary. |
htsjdk.variant.vcf.VCFHeader |
getEvalHeader() |
htsjdk.variant.vcf.VCFHeader |
getTruthHeader() |
protected org.apache.commons.collections4.Predicate<htsjdk.variant.variantcontext.VariantContext> |
makeEvalVariantFilter() |
protected org.apache.commons.collections4.Predicate<htsjdk.variant.variantcontext.VariantContext> |
makeTruthVariantFilter() |
protected void |
onShutdown()
Close all data sources on shutdown.
|
protected void |
onStartup()
Initialize our data sources, make sure that all tool requirements for input data have been satisfied
and start the progress meter.
|
void |
traverse()
A complete traversal from start to finish.
|
directlyAccessEngineFeatureManager, directlyAccessEngineReadsDataSource, directlyAccessEngineReferenceDataSource
addFeatureInputsAfterInitialization, bamIndexCachingShouldBeEnabled, closeTool, createSAMWriter, createVCFWriter, createVCFWriter, createVCFWriter, disableProgressMeter, doWork, getDefaultCloudIndexPrefetchBufferSize, getDefaultCloudPrefetchBufferSize, getDefaultReadFilters, getDefaultToolVCFHeaderLines, getDefaultVariantAnnotationGroups, getDefaultVariantAnnotations, getGenomicsDBOptions, getHeaderForFeatures, getHeaderForReads, getHeaderForSAMWriter, getMasterSequenceDictionary, getPluginDescriptors, getProgressMeterRecordLabel, getReferenceDictionary, getSequenceDictionaryValidationArgumentCollection, getToolName, getTransformedReadStream, getTraversalIntervals, hasFeatures, hasReads, hasReference, hasUserSuppliedIntervals, initializeProgressMeter, makePostReadFilterTransformer, makePreReadFilterTransformer, makeReadFilter, makeSamReaderFactory, makeVariantAnnotations, onTraversalStart, onTraversalSuccess, requiresFeatures, 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
public static final java.lang.String TRUTH_VARIANTS_LONG_NAME
public static final java.lang.String EVAL_VARIANTS_SHORT_NAME
public static final java.lang.String EVAL_VARIANTS_LONG_NAME
public static final java.lang.String CONFIDENCE_REGION_LONG_NAME
public static final java.lang.String CONFIDENCE_REGION_SHORT_NAME
public static final int CACHE_LOOKAHEAD
@Argument(shortName="truth", fullName="truth", doc="A VCF containing truth variants", optional=false) public java.lang.String truthVariantsFile
@Argument(shortName="eval", fullName="evaluation", doc="A VCF containing variants to be compared to the truth", optional=false) public java.lang.String evalVariantsFile
@Argument(doc="TO BE IMPLEMENTED", fullName="confidence", shortName="C", optional=true) protected java.io.File highConfidenceRegion
protected htsjdk.samtools.SAMSequenceDictionary dict
public final htsjdk.samtools.SAMSequenceDictionary getBestAvailableSequenceDictionary()
GATKTool
null
if there is no single best dictionary.
The algorithm for selecting the best dictionary is as follows:
1) If a master sequence dictionary was specified, use that dictionary
2) if there is a reference, then the best dictionary is the reference sequence dictionary
3) Otherwise, if there are reads, then the best dictionary is the sequence dictionary constructed from the reads.
4) Otherwise, if there are features and the feature data source has only one dictionary, then that one is the best dictionary.
5) Otherwise, the result is null
.
TODO: check interval file(s) as well for a sequence dictionary
Subclasses may override if they prefer a different algorithm.getBestAvailableSequenceDictionary
in class GATKTool
null
if no one dictionary is the best one.protected org.apache.commons.collections4.Predicate<htsjdk.variant.variantcontext.VariantContext> makeTruthVariantFilter()
protected org.apache.commons.collections4.Predicate<htsjdk.variant.variantcontext.VariantContext> makeEvalVariantFilter()
protected final void onStartup()
GATKTool
protected abstract void apply(AbstractConcordanceWalker.TruthVersusEval truthVersusEval, ReadsContext readsContext, ReferenceContext refContext)
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 final void onShutdown()
GATKTool
onShutdown
in class GATKTool
public final htsjdk.variant.vcf.VCFHeader getTruthHeader()
public final htsjdk.variant.vcf.VCFHeader getEvalHeader()
protected abstract boolean areVariantsAtSameLocusConcordant(htsjdk.variant.variantcontext.VariantContext truth, htsjdk.variant.variantcontext.VariantContext eval)