Package picard.analysis.directed
Class RnaSeqMetricsCollector.PerUnitRnaSeqMetricsCollector
java.lang.Object
picard.analysis.directed.RnaSeqMetricsCollector.PerUnitRnaSeqMetricsCollector
- All Implemented Interfaces:
PerUnitMetricCollector<RnaSeqMetrics,Integer, htsjdk.samtools.SAMRecord>
- Enclosing class:
RnaSeqMetricsCollector
protected class RnaSeqMetricsCollector.PerUnitRnaSeqMetricsCollector
extends Object
implements PerUnitMetricCollector<RnaSeqMetrics,Integer,htsjdk.samtools.SAMRecord>
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionPerUnitRnaSeqMetricsCollector(String sample, String library, String readGroup, Long ribosomalBasesInitialValue) protectedPerUnitRnaSeqMetricsCollector(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. -
Method Summary
Modifier and TypeMethodDescriptionvoidacceptRecord(htsjdk.samtools.SAMRecord rec) Add a SAMRecord (with ReferenceSequence and Read Group info) to the metric(s) being calculated)voidaddMetricsToFile(htsjdk.samtools.metrics.MetricsFile<RnaSeqMetrics, Integer> file) Any metrics collected will be added to the metric file provided.voidfinish()When all records have been collected, compute any final values needed to finish constructing metrics/HistogramDerived 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 intgetNumAlignedBases(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.
-
Field Details
-
metrics
-
-
Constructor Details
-
PerUnitRnaSeqMetricsCollector
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. -
PerUnitRnaSeqMetricsCollector
-
-
Method Details
-
acceptRecord
public void acceptRecord(htsjdk.samtools.SAMRecord rec) Description copied from interface:PerUnitMetricCollectorAdd a SAMRecord (with ReferenceSequence and Read Group info) to the metric(s) being calculated)- Specified by:
acceptRecordin interfacePerUnitMetricCollector<RnaSeqMetrics,Integer, htsjdk.samtools.SAMRecord> - Parameters:
rec- Contains SAMRecord, SAMReadGroupRecord, ReferenceSequence of current record and any previously computed values that might be needed for this class
-
getNumAlignedBases
protected int getNumAlignedBases(htsjdk.samtools.SAMRecord rec) -
finish
public void finish()Description copied from interface:PerUnitMetricCollectorWhen all records have been collected, compute any final values needed to finish constructing metrics/Histogram- Specified by:
finishin interfacePerUnitMetricCollector<RnaSeqMetrics,Integer, htsjdk.samtools.SAMRecord>
-
addMetricsToFile
Description copied from interface:PerUnitMetricCollectorAny metrics collected will be added to the metric file provided.- Specified by:
addMetricsToFilein interfacePerUnitMetricCollector<RnaSeqMetrics,Integer, htsjdk.samtools.SAMRecord> - Parameters:
file- MetricsFile to which all metrics created by this collector should be added
-
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. -
pickTranscripts
Picks the set of transcripts on which the coverage metrics are to be calculated.
-