Class PerUnitInsertSizeMetricsCollector
java.lang.Object
org.broadinstitute.hellbender.metrics.PerUnitInsertSizeMetricsCollector
- All Implemented Interfaces:
Serializable
,PerUnitMetricCollector<InsertSizeMetrics,
Integer, org.broadinstitute.hellbender.metrics.InsertSizeMetricsCollectorArgs>
public final class PerUnitInsertSizeMetricsCollector
extends Object
implements PerUnitMetricCollector<InsertSizeMetrics,Integer,org.broadinstitute.hellbender.metrics.InsertSizeMetricsCollectorArgs>, Serializable
A Collector for individual InsertSizeMetrics for a given SAMPLE or SAMPLE/LIBRARY or
SAMPLE/LIBRARY/READ_GROUP (depending on aggregation levels)
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionPerUnitInsertSizeMetricsCollector
(String sample, String library, String readGroup, double minimumPct, double deviations, Integer histogramWidth) -
Method Summary
Modifier and TypeMethodDescriptionvoid
acceptRecord
(org.broadinstitute.hellbender.metrics.InsertSizeMetricsCollectorArgs args) Add a SAMRecord (with ReferenceSequence and Read Group info) to the metric(s) being calculated)void
addMetricsToFile
(htsjdk.samtools.metrics.MetricsFile<InsertSizeMetrics, Integer> file) Any metrics collected will be added to the metric file provided.combine
(PerUnitInsertSizeMetricsCollector sourceCollector) Combine this PerUnitInsertSizeMetricsCollector with sourceCollector and return a combined PerUnitInsertSizeMetricsCollector.void
finish()
When all records have been collected, compute any final values needed to finish constructing metrics/Histogramdouble
-
Constructor Details
-
PerUnitInsertSizeMetricsCollector
-
-
Method Details
-
acceptRecord
public void acceptRecord(org.broadinstitute.hellbender.metrics.InsertSizeMetricsCollectorArgs args) Description copied from interface:PerUnitMetricCollector
Add a SAMRecord (with ReferenceSequence and Read Group info) to the metric(s) being calculated)- Specified by:
acceptRecord
in interfacePerUnitMetricCollector<InsertSizeMetrics,
Integer, org.broadinstitute.hellbender.metrics.InsertSizeMetricsCollectorArgs> - Parameters:
args
- Contains SAMRecord, SAMReadGroupRecord, ReferenceSequence of current record and any previously computed values that might be needed for this class
-
finish
public void finish()Description copied from interface:PerUnitMetricCollector
When all records have been collected, compute any final values needed to finish constructing metrics/Histogram- Specified by:
finish
in interfacePerUnitMetricCollector<InsertSizeMetrics,
Integer, org.broadinstitute.hellbender.metrics.InsertSizeMetricsCollectorArgs>
-
getTotalInserts
public double getTotalInserts() -
addMetricsToFile
Description copied from interface:PerUnitMetricCollector
Any metrics collected will be added to the metric file provided.- Specified by:
addMetricsToFile
in interfacePerUnitMetricCollector<InsertSizeMetrics,
Integer, org.broadinstitute.hellbender.metrics.InsertSizeMetricsCollectorArgs> - Parameters:
file
- MetricsFile to which all metrics created by this collector should be added
-
combine
Combine this PerUnitInsertSizeMetricsCollector with sourceCollector and return a combined PerUnitInsertSizeMetricsCollector.- Parameters:
sourceCollector
- PerUnitInsertSizeMetricsCollector to combine in- Returns:
- PerUnitInsertSizeMetricsCollector representing the combination of the source collector with this collector
-