Package picard.analysis
Class AbstractWgsMetricsCollector<T extends htsjdk.samtools.util.AbstractRecordAndOffset>
java.lang.Object
picard.analysis.AbstractWgsMetricsCollector<T>
- Direct Known Subclasses:
CollectWgsMetrics.WgsMetricsCollector
,FastWgsMetricsCollector
public abstract class AbstractWgsMetricsCollector<T extends htsjdk.samtools.util.AbstractRecordAndOffset>
extends Object
Class for collecting data on reference coverage, base qualities and excluded bases from one AbstractLocusInfo object for
CollectWgsMetrics.
The shared code for forming result for CollectWgsMetrics is abstracted into this class. Classes that extend this collector implement their logic in addInfo() method.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected long
The number of processed genomic basesprotected final int
Positions with coverage exceeding this value are treated as if they had coverage at this valueprotected final long[]
Count of sites with a given depth of coverage.protected final htsjdk.samtools.util.IntervalList
protected final long[]
Count of bases observed with a given base quality.protected final long[]
Count of sites with a given depth of coverage. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addBaseQHistogram
(htsjdk.samtools.metrics.MetricsFile<WgsMetrics, Integer> file) abstract void
addInfo
(htsjdk.samtools.util.AbstractLocusInfo<T> info, htsjdk.samtools.reference.ReferenceSequence ref, boolean referenceBaseN) Accumulates the data from AbstractLocusInfo in inner structuresvoid
addToMetricsFile
(htsjdk.samtools.metrics.MetricsFile<WgsMetrics, Integer> file, boolean includeBQHistogram, CountingFilter dupeFilter, CountingFilter adapterFilter, CountingFilter mapqFilter, CountingPairedFilter pairFilter) Adds collected metrics and depth histogram to fileprotected htsjdk.samtools.util.Histogram<Integer>
protected htsjdk.samtools.util.Histogram<Integer>
getHistogram
(long[] array, String binLabel, String valueLabel) protected WgsMetrics
getMetrics
(CountingFilter dupeFilter, CountingFilter adapterFilter, CountingFilter mapqFilter, CountingPairedFilter pairFilter) Creates CollectWgsMetrics.WgsMetrics - the object holding the result of CollectWgsMetricsprotected htsjdk.samtools.util.Histogram<Integer>
protected htsjdk.samtools.util.Histogram<Integer>
void
setCounter
(long counter) Sets the counter to the current number of processed loci.
-
Field Details
-
unfilteredDepthHistogramArray
protected final long[] unfilteredDepthHistogramArrayCount of sites with a given depth of coverage. Includes all but quality 2 bases. We draw depths from this histogram when we calculate the theoretical het sensitivity. -
unfilteredBaseQHistogramArray
protected final long[] unfilteredBaseQHistogramArrayCount of bases observed with a given base quality. Includes all but quality 2 bases. We draw bases from this histogram when we calculate the theoretical het sensitivity. -
highQualityDepthHistogramArray
protected final long[] highQualityDepthHistogramArrayCount of sites with a given depth of coverage. Excludes bases with quality below MINIMUM_BASE_QUALITY (default 20). -
coverageCap
protected final int coverageCapPositions with coverage exceeding this value are treated as if they had coverage at this value -
intervals
protected final htsjdk.samtools.util.IntervalList intervals -
counter
protected long counterThe number of processed genomic bases
-
-
Method Details
-
addInfo
public abstract void addInfo(htsjdk.samtools.util.AbstractLocusInfo<T> info, htsjdk.samtools.reference.ReferenceSequence ref, boolean referenceBaseN) Accumulates the data from AbstractLocusInfo in inner structures- Parameters:
info
-AbstractLocusInfo
with aligned to reference position readsref
-ReferenceSequence
referenceBaseN
- true if current the value of reference base represents a no call
-
addToMetricsFile
public void addToMetricsFile(htsjdk.samtools.metrics.MetricsFile<WgsMetrics, Integer> file, boolean includeBQHistogram, CountingFilter dupeFilter, CountingFilter adapterFilter, CountingFilter mapqFilter, CountingPairedFilter pairFilter) Adds collected metrics and depth histogram to file- Parameters:
file
- MetricsFile for result of collector's workdupeFilter
- counting filter for duplicate readsadapterFilter
- counting filter for adapter readsmapqFilter
- counting filter for mapping qualitypairFilter
- counting filter for reads without a mapped mate pair
-
addBaseQHistogram
-
getHighQualityDepthHistogram
-
getUnfilteredDepthHistogram
-
getUnfilteredBaseQHistogram
-
getHistogram
-
getMetrics
protected WgsMetrics getMetrics(CountingFilter dupeFilter, CountingFilter adapterFilter, CountingFilter mapqFilter, CountingPairedFilter pairFilter) Creates CollectWgsMetrics.WgsMetrics - the object holding the result of CollectWgsMetrics- Parameters:
dupeFilter
- counting filter for duplicate readsmapqFilter
- counting filter for mapping qualitypairFilter
- counting filter for reads without a mapped mate pair- Returns:
- CollectWgsMetrics.WgsMetrics with set fields
-
setCounter
public void setCounter(long counter) Sets the counter to the current number of processed loci. Counter, must be updated from outside, since we are skipping a no call reference positions outside of the collector- Parameters:
counter
- number of processed loci
-