@DocumentedFeature public final class CheckPileup extends LocusWalker
This tool compares the mpileup data (reference base, aligned base from each overlapping read, and quality score) generated internally by GATK to a reference pileup data generated by Samtools, for each position in the requested interval. Note that this only considers the single-sample mpileup format. See the Pileup format documentation for more details on the format.
A text file listing mismatches between the input mpileup and the GATK's internal pileup. If there are no mismatches, the output file is empty.
gatk CheckPileup \ -R reference.fasta \ -I input.bam \ -O output.txt \ --pileup samtools.pileup
Modifier and Type | Field and Description |
---|---|
boolean |
continueAfterAnError
By default the program will quit if it encounters an error (such as missing truth data for a given position).
|
boolean |
ignoreOverlaps |
FeatureInput<SAMPileupFeature> |
mpileup
This is the existing mpileup against which we'll compare GATK's internal pileup at each genome position in the desired interval.
|
java.io.File |
outFile |
MAX_DEPTH_PER_SAMPLE_NAME, maxDepthPerSample
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 |
---|
CheckPileup() |
Modifier and Type | Method and Description |
---|---|
void |
apply(AlignmentContext context,
ReferenceContext ref,
FeatureContext featureContext)
Process an individual AlignmentContext (with optional contextual information).
|
void |
closeTool()
This method is called by the GATK framework at the end of the
GATKTool.doWork() template method. |
java.util.List<ReadFilter> |
getDefaultReadFilters()
Returns the default list of CommandLineReadFilters that are used for this tool.
|
void |
onTraversalStart()
Operations performed just prior to the start of traversal.
|
java.lang.Object |
onTraversalSuccess()
Operations performed immediately after a successful traversal (ie when no uncaught exceptions were thrown during the traversal).
|
java.lang.String |
pileupDiff(ReadPileup a,
SAMPileupFeature b) |
boolean |
requiresReference()
Does this tool require reference data? Traversals types and/or tools that do should override to return true.
|
defaultMaxDepthPerSample, emitEmptyLoci, getDownsamplingInfo, getProgressMeterRecordLabel, includeDeletions, includeNs, keepUniqueReadListInLibs, onShutdown, onStartup, requiresReads, traverse, validateEmitEmptyLociParameters
directlyAccessEngineFeatureManager, directlyAccessEngineReadsDataSource, directlyAccessEngineReferenceDataSource
addFeatureInputsAfterInitialization, createSAMWriter, createSAMWriter, createVCFWriter, createVCFWriter, doWork, getBestAvailableSequenceDictionary, getDefaultCloudIndexPrefetchBufferSize, getDefaultCloudPrefetchBufferSize, getDefaultToolVCFHeaderLines, getDefaultVariantAnnotationGroups, getDefaultVariantAnnotations, getGenomicsDBOptions, getHeaderForFeatures, getHeaderForReads, getHeaderForSAMWriter, getMasterSequenceDictionary, getPluginDescriptors, getReferenceDictionary, getSequenceDictionaryValidationArgumentCollection, getToolName, getTransformedReadStream, getTraversalIntervals, hasFeatures, hasReads, hasReference, hasUserSuppliedIntervals, makePostReadFilterTransformer, makePreReadFilterTransformer, makeReadFilter, makeVariantAnnotations, requiresFeatures, requiresIntervals, 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="pileup", doc="Pileup generated by Samtools") public FeatureInput<SAMPileupFeature> mpileup
@Argument(fullName="output", shortName="O", doc="Output file (if not provided, defaults to STDOUT)", optional=true) public java.io.File outFile
@Argument(fullName="ignore-overlaps", doc="Disable read-pair overlap detection", optional=true) public boolean ignoreOverlaps
@Argument(fullName="continue-after-error", doc="Continue after encountering an error", optional=true) public boolean continueAfterAnError
public java.util.List<ReadFilter> getDefaultReadFilters()
LocusWalker
WellformedReadFilter
and ReadFilterLibrary.MappedReadFilter
filter
with all default options. Subclasses can override to provide alternative filters.
Note: this method is called before command line parsing begins, and thus before a SAMFileHeader is
available through {link #getHeaderForReads}.getDefaultReadFilters
in class LocusWalker
public boolean requiresReference()
GATKTool
requiresReference
in class GATKTool
public void onTraversalStart()
GATKTool
onTraversalStart
in class GATKTool
public void apply(AlignmentContext context, ReferenceContext ref, FeatureContext featureContext)
LocusWalker
apply
in class LocusWalker
context
- current alignment contextref
- Reference bases spanning the current locus. 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 locus
by invoking ReferenceContext.setWindow(int, int)
on this object before calling ReferenceContext.getBases()
featureContext
- Features spanning the current locus. 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).public java.lang.String pileupDiff(ReadPileup a, SAMPileupFeature b)
public java.lang.Object onTraversalSuccess()
GATKTool
onTraversalSuccess
in class GATKTool
public void closeTool()
GATKTool
GATKTool.doWork()
template method.
It is called regardless of whether the GATKTool.traverse()
has succeeded or not.
It is called after the GATKTool.onTraversalSuccess()
has completed (successfully or not)
but before the GATKTool.doWork()
method returns.
In other words, on successful runs both GATKTool.onTraversalSuccess()
and GATKTool.closeTool()
will be called (in this order) while
on failed runs (when GATKTool.traverse()
causes an exception), only GATKTool.closeTool()
will be called.
The default implementation does nothing.
Subclasses should override this method to close any resources that must be closed regardless of the success of traversal.