PerUnitMetricCollector<RnaSeqMetrics,Integer,htsjdk.samtools.SAMRecord>protected class RnaSeqMetricsCollector.PerUnitRnaSeqMetricsCollector extends Object implements PerUnitMetricCollector<RnaSeqMetrics,Integer,htsjdk.samtools.SAMRecord>
| Modifier and Type | Field | Description |
|---|---|---|
protected RnaSeqMetrics |
metrics |
| Modifier | Constructor | Description |
|---|---|---|
|
PerUnitRnaSeqMetricsCollector(String sample,
String library,
String readGroup,
Long ribosomalBasesInitialValue) |
|
protected |
PerUnitRnaSeqMetricsCollector(RnaSeqMetrics metrics,
String sample,
String library,
String readGroup,
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.
|
| Modifier and Type | Method | 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,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 Set<Gene> |
getGenesForPickTranscripts() |
Derived class may override this method in order to return a different set of genes for
picking transcripts for computing coverage, or to cache the value returned by geneOverlapDetector.getAll(),
because it can be expensive to compute repeatedly.
|
protected int |
getNumAlignedBases(htsjdk.samtools.SAMRecord rec) |
|
Map<Gene.Transcript,int[]> |
pickTranscripts(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, String sample, String library, String readGroup, Long ribosomalBasesInitialValue)
public void acceptRecord(htsjdk.samtools.SAMRecord rec)
PerUnitMetricCollectoracceptRecord in interface PerUnitMetricCollector<RnaSeqMetrics,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()
PerUnitMetricCollectorfinish in interface PerUnitMetricCollector<RnaSeqMetrics,Integer,htsjdk.samtools.SAMRecord>public void addMetricsToFile(htsjdk.samtools.metrics.MetricsFile<RnaSeqMetrics,Integer> file)
PerUnitMetricCollectoraddMetricsToFile in interface PerUnitMetricCollector<RnaSeqMetrics,Integer,htsjdk.samtools.SAMRecord>file - MetricsFile to which all metrics created by this collector should be addedprotected Set<Gene> getGenesForPickTranscripts()
public Map<Gene.Transcript,int[]> pickTranscripts(Map<Gene.Transcript,int[]> transcriptCoverage)