@DocumentedFeature public class CollectWgsMetrics extends CommandLineProgram
Modifier and Type | Class and Description |
---|---|
static class |
CollectWgsMetrics.CollectWgsMetricsIntervalArgumentCollection |
static class |
CollectWgsMetrics.WgsMetrics
Metrics for evaluating the performance of whole genome sequencing experiments.
|
protected static class |
CollectWgsMetrics.WgsMetricsCollector |
Modifier and Type | Field and Description |
---|---|
boolean |
COUNT_UNPAIRED |
int |
COVERAGE_CAP |
boolean |
INCLUDE_BQ_HISTOGRAM |
java.io.File |
INPUT |
protected IntervalArgumentCollection |
intervalArugmentCollection |
protected java.io.File |
INTERVALS |
int |
LOCUS_ACCUMULATION_CAP |
int |
MINIMUM_BASE_QUALITY |
int |
MINIMUM_MAPPING_QUALITY |
java.io.File |
OUTPUT |
int |
READ_LENGTH |
int |
SAMPLE_SIZE |
long |
STOP_AFTER |
boolean |
USE_FAST_ALGORITHM |
COMPRESSION_LEVEL, CREATE_INDEX, CREATE_MD5_FILE, GA4GH_CLIENT_SECRETS, MAX_RECORDS_IN_RAM, QUIET, REFERENCE_SEQUENCE, referenceSequence, specialArgumentsCollection, TMP_DIR, USE_JDK_DEFLATER, USE_JDK_INFLATER, VALIDATION_STRINGENCY, VERBOSITY
Constructor and Description |
---|
CollectWgsMetrics() |
Modifier and Type | Method and Description |
---|---|
protected int |
doWork()
Do the work after command line has been parsed.
|
protected CollectWgsMetrics.WgsMetrics |
generateWgsMetrics(htsjdk.samtools.util.IntervalList intervals,
htsjdk.samtools.util.Histogram<java.lang.Integer> highQualityDepthHistogram,
htsjdk.samtools.util.Histogram<java.lang.Integer> unfilteredDepthHistogram,
double pctExcludedByMapq,
double pctExcludedByDupes,
double pctExcludedByPairing,
double pctExcludedByBaseq,
double pctExcludedByOverlap,
double pctExcludedByCapping,
double pctTotal,
int coverageCap,
htsjdk.samtools.util.Histogram<java.lang.Integer> unfilteredBaseQHistogram,
int theoreticalHetSensitivitySampleSize) |
protected long |
getBasesExcludedBy(CountingFilter filter)
If INTERVALS is specified, this will count bases beyond the interval list when the read overlaps the intervals and extends beyond the
edge.
|
protected AbstractWgsMetricsCollector |
getCollector(int coverageCap,
htsjdk.samtools.util.IntervalList intervals)
Creates
AbstractWgsMetricsCollector implementation according to this#USE_FAST_ALGORITHM value. |
protected htsjdk.samtools.util.IntervalList |
getIntervalsToExamine()
Gets the intervals over which we will calculate metrics.
|
protected htsjdk.samtools.util.AbstractLocusIterator |
getLocusIterator(htsjdk.samtools.SamReader in)
Creates
AbstractLocusIterator implementation according to this#USE_FAST_ALGORITHM value. |
protected htsjdk.samtools.SAMFileHeader |
getSamFileHeader()
This method should only be called after
this.getSamReader() is called. |
protected htsjdk.samtools.SamReader |
getSamReader()
Gets the SamReader from which records will be examined.
|
static void |
main(java.lang.String[] args) |
protected IntervalArgumentCollection |
makeIntervalArgumentCollection() |
protected boolean |
requiresReference() |
customCommandLineValidation, getCommandLine, getCommandLineParser, getDefaultHeaders, getFaqLink, getMetricsFile, getStandardUsagePreamble, getStandardUsagePreamble, getVersion, hasWebDocumentation, instanceMain, instanceMainWithExit, makeReferenceArgumentCollection, parseArgs, setDefaultHeaders, useLegacyParser
@Argument(shortName="I", doc="Input SAM or BAM file.") public java.io.File INPUT
@Argument(shortName="O", doc="Output metrics file.") public java.io.File OUTPUT
@Argument(shortName="MQ", doc="Minimum mapping quality for a read to contribute coverage.") public int MINIMUM_MAPPING_QUALITY
@Argument(shortName="Q", doc="Minimum base quality for a base to contribute coverage. N bases will be treated as having a base quality of negative infinity and will therefore be excluded from coverage regardless of the value of this parameter.") public int MINIMUM_BASE_QUALITY
@Argument(shortName="CAP", doc="Treat positions with coverage exceeding this value as if they had coverage at this value (but calculate the difference for PCT_EXC_CAPPED).") public int COVERAGE_CAP
@Argument(doc="At positions with coverage exceeding this value, completely ignore reads that accumulate beyond this value (so that they will not be considered for PCT_EXC_CAPPED). Used to keep memory consumption in check, but could create bias if set too low") public int LOCUS_ACCUMULATION_CAP
@Argument(doc="For debugging purposes, stop after processing this many genomic bases.") public long STOP_AFTER
@Argument(doc="Determines whether to include the base quality histogram in the metrics file.") public boolean INCLUDE_BQ_HISTOGRAM
@Argument(doc="If true, count unpaired reads, and paired reads with one end unmapped") public boolean COUNT_UNPAIRED
@Argument(doc="Sample Size used for Theoretical Het Sensitivity sampling. Default is 10000.", optional=true) public int SAMPLE_SIZE
@ArgumentCollection protected IntervalArgumentCollection intervalArugmentCollection
@Argument(doc="If true, fast algorithm is used.") public boolean USE_FAST_ALGORITHM
@Argument(doc="Average read length in the file. Default is 150.", optional=true) public int READ_LENGTH
protected java.io.File INTERVALS
protected boolean requiresReference()
requiresReference
in class CommandLineProgram
protected IntervalArgumentCollection makeIntervalArgumentCollection()
public static void main(java.lang.String[] args)
protected htsjdk.samtools.SamReader getSamReader()
protected int doWork()
CommandLineProgram
doWork
in class CommandLineProgram
protected htsjdk.samtools.util.IntervalList getIntervalsToExamine()
protected htsjdk.samtools.SAMFileHeader getSamFileHeader()
this.getSamReader()
is called.protected CollectWgsMetrics.WgsMetrics generateWgsMetrics(htsjdk.samtools.util.IntervalList intervals, htsjdk.samtools.util.Histogram<java.lang.Integer> highQualityDepthHistogram, htsjdk.samtools.util.Histogram<java.lang.Integer> unfilteredDepthHistogram, double pctExcludedByMapq, double pctExcludedByDupes, double pctExcludedByPairing, double pctExcludedByBaseq, double pctExcludedByOverlap, double pctExcludedByCapping, double pctTotal, int coverageCap, htsjdk.samtools.util.Histogram<java.lang.Integer> unfilteredBaseQHistogram, int theoreticalHetSensitivitySampleSize)
protected long getBasesExcludedBy(CountingFilter filter)
protected htsjdk.samtools.util.AbstractLocusIterator getLocusIterator(htsjdk.samtools.SamReader in)
AbstractLocusIterator
implementation according to this#USE_FAST_ALGORITHM
value.in
- inner SamReader
this#USE_FAST_ALGORITHM
is enabled, returns EdgeReadIterator
implementation,
otherwise default algorithm is used and SamLocusIterator
is returned.protected AbstractWgsMetricsCollector getCollector(int coverageCap, htsjdk.samtools.util.IntervalList intervals)
AbstractWgsMetricsCollector
implementation according to this#USE_FAST_ALGORITHM
value.coverageCap
- the maximum depth/coverage to consider.intervals
- the intervals over which metrics are collected.this#USE_FAST_ALGORITHM
is enabled, returns FastWgsMetricsCollector
implementation,
otherwise default algorithm is used and CollectWgsMetrics.WgsMetricsCollector
is returned.