public class CollectWgsMetrics extends CommandLineProgram
Modifier and Type | Class and Description |
---|---|
static class |
CollectWgsMetrics.WgsMetrics
Metrics for evaluating the performance of whole genome sequencing experiments.
|
protected class |
CollectWgsMetrics.WgsMetricsCollector |
Modifier and Type | Field and Description |
---|---|
boolean |
COUNT_UNPAIRED |
int |
COVERAGE_CAP |
boolean |
INCLUDE_BQ_HISTOGRAM |
File |
INPUT |
File |
INTERVALS |
int |
LOCUS_ACCUMULATION_CAP |
int |
MINIMUM_BASE_QUALITY |
int |
MINIMUM_MAPPING_QUALITY |
File |
OUTPUT |
File |
REFERENCE_SEQUENCE |
int |
SAMPLE_SIZE |
long |
STOP_AFTER |
COMPRESSION_LEVEL, CREATE_INDEX, CREATE_MD5_FILE, GA4GH_CLIENT_SECRETS, MAX_RECORDS_IN_RAM, QUIET, TMP_DIR, 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<Integer> depthHistogram,
double pctExcludedByMapq,
double pctExcludedByDupes,
double pctExcludedByPairing,
double pctExcludedByBaseq,
double pctExcludedByOverlap,
double pctExcludedByCapping,
double pctTotal,
int coverageCap,
htsjdk.samtools.util.Histogram<Integer> baseQHistogram,
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 CollectWgsMetrics.WgsMetricsCollector |
getCollector(int coverageCap,
htsjdk.samtools.util.IntervalList intervals) |
protected htsjdk.samtools.util.IntervalList |
getIntervalsToExamine()
Gets the intervals over which we will calculate metrics.
|
protected htsjdk.samtools.util.SamLocusIterator |
getLocusIterator(htsjdk.samtools.SamReader in) |
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(String[] args) |
customCommandLineValidation, getCommandLine, getCommandLineParser, getDefaultHeaders, getMetricsFile, getNestedOptions, getNestedOptionsForHelp, getStandardUsagePreamble, getVersion, instanceMain, instanceMainWithExit, parseArgs, setDefaultHeaders
@Option(shortName="R", doc="The reference sequence fasta aligned to.") public File REFERENCE_SEQUENCE
@Option(shortName="MQ", doc="Minimum mapping quality for a read to contribute coverage.", overridable=true) public int MINIMUM_MAPPING_QUALITY
@Option(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.", overridable=true) public int MINIMUM_BASE_QUALITY
@Option(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).", overridable=true) public int COVERAGE_CAP
@Option(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", overridable=true) public int LOCUS_ACCUMULATION_CAP
@Option(doc="For debugging purposes, stop after processing this many genomic bases.") public long STOP_AFTER
@Option(doc="Determines whether to include the base quality histogram in the metrics file.") public boolean INCLUDE_BQ_HISTOGRAM
@Option(doc="If true, count unpaired reads, and paired reads with one end unmapped") public boolean COUNT_UNPAIRED
@Option(doc="Sample Size used for Theoretical Het Sensitivity sampling. Default is 10000.", optional=true) public int SAMPLE_SIZE
@Option(doc="An interval list file that contains the positions to restrict the assessment. Please note that all bases of reads that overlap these intervals will be considered, even if some of those bases extend beyond the boundaries of the interval. The ideal use case for this argument is to use it to restrict the calculation to a subset of (whole) contigs. To restrict the calculation just to individual positions without overlap, please see CollectWgsMetricsFromSampledSites.", optional=true, overridable=true) public File INTERVALS
public static void main(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<Integer> depthHistogram, double pctExcludedByMapq, double pctExcludedByDupes, double pctExcludedByPairing, double pctExcludedByBaseq, double pctExcludedByOverlap, double pctExcludedByCapping, double pctTotal, int coverageCap, htsjdk.samtools.util.Histogram<Integer> baseQHistogram, int theoreticalHetSensitivitySampleSize)
protected long getBasesExcludedBy(CountingFilter filter)
protected htsjdk.samtools.util.SamLocusIterator getLocusIterator(htsjdk.samtools.SamReader in)
protected CollectWgsMetrics.WgsMetricsCollector getCollector(int coverageCap, htsjdk.samtools.util.IntervalList intervals)
coverageCap
- the maximum depth/coverage to consider.intervals
- the intervals over which metrics are collected.