Documentation ¶
Index ¶
Constants ¶
const ( Exon = "exon" ExonIntron = "exonic_intronic" Intergenic = "intergenic" Intron = "intron" Other = "others" Total = "total" )
general element constants
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CoverageStats ¶
type CoverageStats struct { Total ElementStats `json:"total"` Continuous ElementStats `json:"continuous"` Split ElementStats `json:"split"` Uniq bool `json:"-"` // contains filtered or unexported fields }
CoverageStats represents genome coverage statistics for continuos, split and total mapped reads.
func NewCoverageStats ¶
func NewCoverageStats(index *annotation.RtreeMap, uniq bool) *CoverageStats
NewCoverageStats create a new instance of CoverageStats.
func (*CoverageStats) Collect ¶
func (s *CoverageStats) Collect(record *sam.Record)
Collect collects genome coverage statistics from a sam.Record.
func (*CoverageStats) Finalize ¶
func (s *CoverageStats) Finalize()
Finalize updates dependent counts of a CoverageStats instance.
func (*CoverageStats) Merge ¶
func (s *CoverageStats) Merge(others chan Stats)
Merge update counts from a channel of Stats instances.
func (*CoverageStats) Update ¶
func (s *CoverageStats) Update(other Stats)
Update updates all counts from a Stats instance.
type ElementStats ¶
ElementStats represents mappings statistics for genomic elements
func (ElementStats) MarshalJSON ¶
func (s ElementStats) MarshalJSON() ([]byte, error)
MarshalJSON implements JSON Marshaller interface
func (ElementStats) MergeKeys ¶
func (s ElementStats) MergeKeys(other ElementStats) []string
MergeKeys combine keys from two ElementsStats instances
func (ElementStats) Update ¶
func (s ElementStats) Update(other ElementStats)
Update updates all counts from another ElementsStats instance.
type GeneralStats ¶
type GeneralStats struct { Protocol string `json:"protocol"` Reads MappingsStats `json:"reads,omitempty"` Pairs MappedPairsStats `json:"pairs,omitempty"` }
GeneralStats represents general mapping statistics
func NewGeneralStats ¶
func NewGeneralStats() *GeneralStats
NewGeneralStats creates a new instance of GeneralStats
func (*GeneralStats) Collect ¶
func (s *GeneralStats) Collect(r *sam.Record)
Collect collects general mapping statistics from a sam.Record.
func (*GeneralStats) Finalize ¶
func (s *GeneralStats) Finalize()
Finalize updates dependent counts of a Stats instance.
func (*GeneralStats) Merge ¶
func (s *GeneralStats) Merge(others chan Stats)
Merge updates counts from a channel of Stats instances.
func (*GeneralStats) Update ¶
func (s *GeneralStats) Update(other Stats)
Update updates all counts from a Stats instance.
type MappedPairsStats ¶
type MappedPairsStats struct { MappedReadsStats InsertSizes TagMap `json:"insert_sizes,omitempty"` }
MappedPairsStats represents statistcs for mapped read-pairs
func NewMappedPairsStats ¶
func NewMappedPairsStats() *MappedPairsStats
NewMappedPairsStats creates a new instance of MappedPairsStats
func (*MappedPairsStats) FilterInsertSizes ¶
func (s *MappedPairsStats) FilterInsertSizes(percent float64)
FilterInsertSizes filters out insert size lengths having support below the given percentage of total read-pairs.
func (*MappedPairsStats) Update ¶
func (s *MappedPairsStats) Update(other MappedPairsStats)
Update updates all counts from another MappedPairsStats instance.
type MappedReadsStats ¶
type MappedReadsStats struct { Total uint64 `json:"total,omitempty"` Unmapped uint64 `json:"unmapped,omitempty"` Mapped TagMap `json:"mapped,omitempty"` Duplicates uint64 `json:"duplicates,omitempty"` }
MappedReadsStats represents statistics for mapped reads
func NewMappedReadsStats ¶
func NewMappedReadsStats() *MappedReadsStats
NewMappedReadsStats creates a new instance of MappedReadsStats
func (*MappedReadsStats) Unique ¶
func (s *MappedReadsStats) Unique() uint64
Unique returns the number of uniquely mapped reads.
func (*MappedReadsStats) Update ¶
func (s *MappedReadsStats) Update(other MappedReadsStats)
Update updates all counts from another MappedReadStats instance.
func (*MappedReadsStats) UpdateUnmapped ¶
func (s *MappedReadsStats) UpdateUnmapped()
UpdateUnmapped updates the count of unmapped pairs
type MappingsStats ¶
type MappingsStats struct { MappedReadsStats Mappings MultimapStats `json:"mappings"` }
MappingsStats represents statistics for mappings
func (*MappingsStats) Update ¶
func (s *MappingsStats) Update(other MappingsStats)
Update updates all counts from another MappingsStats instance.
func (*MappingsStats) UpdateMappingsRatio ¶
func (s *MappingsStats) UpdateMappingsRatio()
UpdateMappingsRatio updates ration of mappings vs total mapped reads.
type MultimapStats ¶
type MultimapStats struct { Ratio fraction `json:"ratio"` Count uint64 `json:"count"` }
MultimapStats represents statistics for multi-maps
type RNAseqMetrics ¶
type RNAseqMetrics struct { Mapped fraction `json:"fraction_mapped,omitempty"` Intergenic fraction `json:"fraction_intergenic,omitempty"` RRNA fraction `json:"fraction_rrna,omitempty"` Duplicates fraction `json:"fraction_duplicates,omitempty"` }
RNAseqMetrics represents statistics for mapped reads
type RNAseqStats ¶
type RNAseqStats struct { Intergenic uint64 `json:"intergenic"` RRNA uint64 `json:"rRNA"` Metrics *RNAseqMetrics `json:"metrics,omitempty"` // contains filtered or unexported fields }
RNAseqStats represents statistics for mapped reads
func NewIHECstats ¶
func NewIHECstats(index *annotation.RtreeMap) *RNAseqStats
NewIHECstats creates a new instance of IHECstats
func (*RNAseqStats) Collect ¶
func (s *RNAseqStats) Collect(record *sam.Record)
Collect collects general mapping statistics from a sam.Record.
func (*RNAseqStats) Finalize ¶
func (s *RNAseqStats) Finalize()
Finalize updates dependent counts of a Stats instance.
func (*RNAseqStats) Merge ¶
func (s *RNAseqStats) Merge(others chan Stats)
Merge updates counts from a channel of Stats instances.
func (*RNAseqStats) Update ¶
func (s *RNAseqStats) Update(other Stats)
Update updates all counts from a Stats instance.
func (*RNAseqStats) UpdateTotal ¶
func (s *RNAseqStats) UpdateTotal(amount uint64)
UpdateTotal adds amount to total
type Stats ¶
type Stats interface { Type() string Update(other Stats) Merge(others chan Stats) Collect(record *sam.Record) Finalize() }
Stats represents mapping statistics.
type TagMap ¶
TagMap represents a map of sam tags with integer keys
func (TagMap) MarshalJSON ¶
MarshalJSON returns a JSON representation of a TagMap, numerically sorting the keys.
func (*TagMap) UnmarshalJSON ¶
UnmarshalJSON parse a JSON representation of a TagMap.