public abstract class TargetMetricsCollector<METRIC_TYPE extends MultilevelMetrics> extends SAMRecordMultiLevelCollector<METRIC_TYPE,java.lang.Integer>
Modifier and Type | Class and Description |
---|---|
static class |
TargetMetricsCollector.Coverage
A simple class that is used to store the coverage information about an interval.
|
class |
TargetMetricsCollector.PerUnitTargetMetricCollector
Collect the Target Metrics for one unit of "accumulation" (i.e.
|
Modifier and Type | Field and Description |
---|---|
static int |
NEAR_PROBE_DISTANCE_DEFAULT
Default distance for a read to be considered "selected".
|
UNKNOWN
Constructor and Description |
---|
TargetMetricsCollector(java.util.Set<MetricAccumulationLevel> accumulationLevels,
java.util.List<htsjdk.samtools.SAMReadGroupRecord> samRgRecords,
htsjdk.samtools.reference.ReferenceSequenceFile refFile,
java.io.File perTargetCoverage,
java.io.File perBaseCoverage,
htsjdk.samtools.util.IntervalList targetIntervals,
htsjdk.samtools.util.IntervalList probeIntervals,
java.lang.String probeSetName,
int nearProbeDistance,
int minimumMappingQuality,
int minimumBaseQuality,
boolean clipOverlappingReads,
boolean noSideEffects,
int coverageCap,
int sampleSize) |
TargetMetricsCollector(java.util.Set<MetricAccumulationLevel> accumulationLevels,
java.util.List<htsjdk.samtools.SAMReadGroupRecord> samRgRecords,
htsjdk.samtools.reference.ReferenceSequenceFile refFile,
java.io.File perTargetCoverage,
java.io.File perBaseCoverage,
htsjdk.samtools.util.IntervalList targetIntervals,
htsjdk.samtools.util.IntervalList probeIntervals,
java.lang.String probeSetName,
int nearProbeDistance,
int minimumMappingQuality,
int minimumBaseQuality,
boolean clipOverlappingReads,
int coverageCap,
int sampleSize) |
Modifier and Type | Method and Description |
---|---|
abstract METRIC_TYPE |
convertMetric(picard.analysis.directed.TargetMetrics targetMetrics) |
int |
getNearProbeDistance()
Gets the distance that is allowed between a read and the nearest probe for it to be considered "near probe" and "selected.
|
static int |
getNumBasesPassingMinimumBaseQuality(htsjdk.samtools.SAMRecord record,
htsjdk.samtools.AlignmentBlock block,
int minimumBaseQuality)
Get the the number of bases in the given alignment block and record that have base quality greater or equal to the minimum
|
protected PerUnitMetricCollector<METRIC_TYPE,java.lang.Integer,htsjdk.samtools.SAMRecord> |
makeAllReadCollector() |
protected PerUnitMetricCollector<METRIC_TYPE,java.lang.Integer,htsjdk.samtools.SAMRecord> |
makeChildCollector(java.lang.String sample,
java.lang.String library,
java.lang.String readGroup)
Construct a PerUnitMetricCollector with the given arguments.
|
protected static <MT extends htsjdk.samtools.metrics.MetricBase> |
reflectiveCopy(picard.analysis.directed.TargetMetrics targetMetrics,
MT outputMetrics,
java.lang.String[] targetKeys,
java.lang.String[] outputKeys)
Since the targeted metrics (HsMetrics, TargetedPcrMetrics,...) share many of the same values as TargetMetrics, this copy will copy all public attributes in targetMetrics
to the outputMetrics' attributes of the same name.
|
void |
setNearProbeDistance(int nearProbeDistance)
Sets the distance that is allowed between a read and the nearest probe for it to be considered "near probe" and "selected.
|
void |
setNoSideEffects(boolean value)
In the case of ignoring bases in overlapping reads from the same template,
we choose to internally modify the SAM record's CIGAR to clip overlapping bases.
|
makeArg
acceptRecord, addAllLevelsToFile, finish, getAllReadsCollector, makeLibraryCollector, makeReadGroupCollector, makeSampleCollector, setup
public static final int NEAR_PROBE_DISTANCE_DEFAULT
public TargetMetricsCollector(java.util.Set<MetricAccumulationLevel> accumulationLevels, java.util.List<htsjdk.samtools.SAMReadGroupRecord> samRgRecords, htsjdk.samtools.reference.ReferenceSequenceFile refFile, java.io.File perTargetCoverage, java.io.File perBaseCoverage, htsjdk.samtools.util.IntervalList targetIntervals, htsjdk.samtools.util.IntervalList probeIntervals, java.lang.String probeSetName, int nearProbeDistance, int minimumMappingQuality, int minimumBaseQuality, boolean clipOverlappingReads, int coverageCap, int sampleSize)
public TargetMetricsCollector(java.util.Set<MetricAccumulationLevel> accumulationLevels, java.util.List<htsjdk.samtools.SAMReadGroupRecord> samRgRecords, htsjdk.samtools.reference.ReferenceSequenceFile refFile, java.io.File perTargetCoverage, java.io.File perBaseCoverage, htsjdk.samtools.util.IntervalList targetIntervals, htsjdk.samtools.util.IntervalList probeIntervals, java.lang.String probeSetName, int nearProbeDistance, int minimumMappingQuality, int minimumBaseQuality, boolean clipOverlappingReads, boolean noSideEffects, int coverageCap, int sampleSize)
public int getNearProbeDistance()
public void setNearProbeDistance(int nearProbeDistance)
public abstract METRIC_TYPE convertMetric(picard.analysis.directed.TargetMetrics targetMetrics)
public void setNoSideEffects(boolean value)
MultiLevelCollector.acceptRecord(htsjdk.samtools.SAMRecord, htsjdk.samtools.reference.ReferenceSequence)
is modified can pass in false to this method to realize performance gains.value
- the boolean value to set.public static int getNumBasesPassingMinimumBaseQuality(htsjdk.samtools.SAMRecord record, htsjdk.samtools.AlignmentBlock block, int minimumBaseQuality)
protected static <MT extends htsjdk.samtools.metrics.MetricBase> void reflectiveCopy(picard.analysis.directed.TargetMetrics targetMetrics, MT outputMetrics, java.lang.String[] targetKeys, java.lang.String[] outputKeys)
MT
- The type of metric of outputMetricstargetMetrics
- A metric with values to be copiedoutputMetrics
- A metrics intended to receive values from targetMetricstargetKeys
- Specific names of attributes of targetMetrics to copy to outputMetrics, each key has a corresponding one in outputKeysoutputKeys
- Specific names of the destination attributes of outputMetrics that will be filled with values of outputMetrics, each key has a corresponding one in targetKeysprotected PerUnitMetricCollector<METRIC_TYPE,java.lang.Integer,htsjdk.samtools.SAMRecord> makeChildCollector(java.lang.String sample, java.lang.String library, java.lang.String readGroup)
MultiLevelCollector
makeChildCollector
in class MultiLevelCollector<METRIC_TYPE extends MultilevelMetrics,java.lang.Integer,htsjdk.samtools.SAMRecord>
sample
- If aggregating by ALL_READS this will be null, otherwise the sample that will be used to identify
this collectorlibrary
- If aggregating by SAMPLE this will be null, otherwise the library that will be used to identify
this collectorreadGroup
- If aggregating by LIBRARY this will be null, otherwise the readGroup that will be used to identify
this collectorprotected PerUnitMetricCollector<METRIC_TYPE,java.lang.Integer,htsjdk.samtools.SAMRecord> makeAllReadCollector()
makeAllReadCollector
in class MultiLevelCollector<METRIC_TYPE extends MultilevelMetrics,java.lang.Integer,htsjdk.samtools.SAMRecord>