METRIC_TYPE
- The type of metrics being collectedHISTOGRAM_KEY
- If there is are Histograms related to metrics of type ARGTYPE
- The type of argument passed to individual PerUnitMetricCollector (see SAMRecordMultilevelCollector and PerUnitMetricCollector)public abstract class MultiLevelCollector<METRIC_TYPE extends htsjdk.samtools.metrics.MetricBase,HISTOGRAM_KEY extends java.lang.Comparable<HISTOGRAM_KEY>,ARGTYPE>
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
UNKNOWN |
Constructor and Description |
---|
MultiLevelCollector() |
Modifier and Type | Method and Description |
---|---|
void |
acceptRecord(htsjdk.samtools.SAMRecord record,
htsjdk.samtools.reference.ReferenceSequence refSeq)
Construct a argument of ARGTYPE using the given SAMRecord and ReferenceSequence then pass
this value to all collectors that should include this record
|
void |
addAllLevelsToFile(htsjdk.samtools.metrics.MetricsFile<METRIC_TYPE,HISTOGRAM_KEY> file)
Add all metrics to the given file in the following MetricAccumulationLevel order
ALL_READS, SAMPLE, LIBRARY, READ_GROUP.
|
void |
finish()
Call finish on all PerUnitMetricCollectors
|
PerUnitMetricCollector<METRIC_TYPE,HISTOGRAM_KEY,ARGTYPE> |
getAllReadsCollector()
Get the PerUnitMetricCollector that collects reads for all levels
|
protected PerUnitMetricCollector<METRIC_TYPE,HISTOGRAM_KEY,ARGTYPE> |
makeAllReadCollector() |
protected abstract ARGTYPE |
makeArg(htsjdk.samtools.SAMRecord samRec,
htsjdk.samtools.reference.ReferenceSequence refSeq) |
protected abstract PerUnitMetricCollector<METRIC_TYPE,HISTOGRAM_KEY,ARGTYPE> |
makeChildCollector(java.lang.String sample,
java.lang.String library,
java.lang.String readGroup)
Construct a PerUnitMetricCollector with the given arguments.
|
protected PerUnitMetricCollector<METRIC_TYPE,HISTOGRAM_KEY,ARGTYPE> |
makeLibraryCollector(htsjdk.samtools.SAMReadGroupRecord rg) |
protected PerUnitMetricCollector<METRIC_TYPE,HISTOGRAM_KEY,ARGTYPE> |
makeReadGroupCollector(htsjdk.samtools.SAMReadGroupRecord rg) |
protected PerUnitMetricCollector<METRIC_TYPE,HISTOGRAM_KEY,ARGTYPE> |
makeSampleCollector(htsjdk.samtools.SAMReadGroupRecord rg) |
protected void |
setup(java.util.Set<MetricAccumulationLevel> accumulationLevels,
java.util.List<htsjdk.samtools.SAMReadGroupRecord> samRgRecords)
Use an init method so that overloaded methods in subclasses can pass use parameters that are initialized in their constructor
|
public static final java.lang.String UNKNOWN
protected abstract ARGTYPE makeArg(htsjdk.samtools.SAMRecord samRec, htsjdk.samtools.reference.ReferenceSequence refSeq)
protected abstract PerUnitMetricCollector<METRIC_TYPE,HISTOGRAM_KEY,ARGTYPE> makeChildCollector(java.lang.String sample, java.lang.String library, java.lang.String readGroup)
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,HISTOGRAM_KEY,ARGTYPE> makeAllReadCollector()
protected PerUnitMetricCollector<METRIC_TYPE,HISTOGRAM_KEY,ARGTYPE> makeSampleCollector(htsjdk.samtools.SAMReadGroupRecord rg)
protected PerUnitMetricCollector<METRIC_TYPE,HISTOGRAM_KEY,ARGTYPE> makeLibraryCollector(htsjdk.samtools.SAMReadGroupRecord rg)
protected PerUnitMetricCollector<METRIC_TYPE,HISTOGRAM_KEY,ARGTYPE> makeReadGroupCollector(htsjdk.samtools.SAMReadGroupRecord rg)
protected void setup(java.util.Set<MetricAccumulationLevel> accumulationLevels, java.util.List<htsjdk.samtools.SAMReadGroupRecord> samRgRecords)
accumulationLevels
- PerUnitMetricCollectors will only be created for the levels identified by accumulationLevelssamRgRecords
- PerUnitMetricCollectors will be created for each of the different samples, libraries, and
readGroups found in the records depending on the accumulationLevels providedpublic void acceptRecord(htsjdk.samtools.SAMRecord record, htsjdk.samtools.reference.ReferenceSequence refSeq)
public void finish()
public PerUnitMetricCollector<METRIC_TYPE,HISTOGRAM_KEY,ARGTYPE> getAllReadsCollector()
public void addAllLevelsToFile(htsjdk.samtools.metrics.MetricsFile<METRIC_TYPE,HISTOGRAM_KEY> file)