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 Details

    • PerUnitInsertSizeMetricsCollector

      public PerUnitInsertSizeMetricsCollector(String sample, String library, String readGroup, double minimumPct, double deviations, Integer histogramWidth)
  • 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 interface PerUnitMetricCollector<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 interface PerUnitMetricCollector<InsertSizeMetrics,Integer,org.broadinstitute.hellbender.metrics.InsertSizeMetricsCollectorArgs>
    • getTotalInserts

      public double getTotalInserts()
    • addMetricsToFile

      public void addMetricsToFile(htsjdk.samtools.metrics.MetricsFile<InsertSizeMetrics,Integer> file)
      Description copied from interface: PerUnitMetricCollector
      Any metrics collected will be added to the metric file provided.
      Specified by:
      addMetricsToFile in interface PerUnitMetricCollector<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