protected class RnaSeqMetricsCollector.PerUnitRnaSeqMetricsCollector extends java.lang.Object implements PerUnitMetricCollector<RnaSeqMetrics,java.lang.Integer,htsjdk.samtools.SAMRecord>
Modifier and Type | Field and Description |
---|---|
protected RnaSeqMetrics |
metrics |
Modifier | Constructor and Description |
---|---|
protected |
PerUnitRnaSeqMetricsCollector(RnaSeqMetrics metrics,
java.lang.String sample,
java.lang.String library,
java.lang.String readGroup,
java.lang.Long ribosomalBasesInitialValue)
Derived classes that need to capture some additional metrics can use this ctor to supply a metrics instance
that is a subclass of RnaSeqMetrics.
|
|
PerUnitRnaSeqMetricsCollector(java.lang.String sample,
java.lang.String library,
java.lang.String readGroup,
java.lang.Long ribosomalBasesInitialValue) |
Modifier and Type | Method and Description |
---|---|
void |
acceptRecord(htsjdk.samtools.SAMRecord rec)
Add a SAMRecord (with ReferenceSequence and Read Group info) to the metric(s) being calculated)
|
void |
addMetricsToFile(htsjdk.samtools.metrics.MetricsFile<RnaSeqMetrics,java.lang.Integer> file)
Any metrics collected will be added to the metric file provided.
|
void |
finish()
When all records have been collected, compute any final values needed to finish constructing metrics/Histogram
|
protected int |
getNumAlignedBases(htsjdk.samtools.SAMRecord rec) |
java.util.Map<Gene.Transcript,int[]> |
pickTranscripts(java.util.Map<Gene.Transcript,int[]> transcriptCoverage)
Picks the set of transcripts on which the coverage metrics are to be calculated.
|
protected final RnaSeqMetrics metrics
protected PerUnitRnaSeqMetricsCollector(RnaSeqMetrics metrics, java.lang.String sample, java.lang.String library, java.lang.String readGroup, java.lang.Long ribosomalBasesInitialValue)
public PerUnitRnaSeqMetricsCollector(java.lang.String sample, java.lang.String library, java.lang.String readGroup, java.lang.Long ribosomalBasesInitialValue)
public void acceptRecord(htsjdk.samtools.SAMRecord rec)
PerUnitMetricCollector
acceptRecord
in interface PerUnitMetricCollector<RnaSeqMetrics,java.lang.Integer,htsjdk.samtools.SAMRecord>
rec
- Contains SAMRecord, SAMReadGroupRecord, ReferenceSequence of current record and any previously
computed values that might be needed for this classprotected int getNumAlignedBases(htsjdk.samtools.SAMRecord rec)
public void finish()
PerUnitMetricCollector
finish
in interface PerUnitMetricCollector<RnaSeqMetrics,java.lang.Integer,htsjdk.samtools.SAMRecord>
public void addMetricsToFile(htsjdk.samtools.metrics.MetricsFile<RnaSeqMetrics,java.lang.Integer> file)
PerUnitMetricCollector
addMetricsToFile
in interface PerUnitMetricCollector<RnaSeqMetrics,java.lang.Integer,htsjdk.samtools.SAMRecord>
file
- MetricsFile to which all metrics created by this collector should be addedpublic java.util.Map<Gene.Transcript,int[]> pickTranscripts(java.util.Map<Gene.Transcript,int[]> transcriptCoverage)