Documentation
¶
Index ¶
- Constants
- func IdentifyFlowcell(fcid string) string
- func IdentifyPlatform(iid string) string
- func PlatformReadyMarker(platform string) string
- type BinDefinition
- type Consumable
- type CorrectedIntensity
- type ErrorMetricRecord
- type ErrorMetrics
- type ExtTileMetricRecord
- type ExtTileMetrics
- type FlowcellInfo
- type Header
- type IndexMetricRecord
- type IndexMetrics
- type IndexSummary
- type IndexSummaryRecord
- type Interop
- func (i Interop) IndexSummary() IndexSummary
- func (i Interop) LaneErrorRate() map[int]float64
- func (i Interop) LaneFracOccupied() map[int]float64
- func (i Interop) LanePercentQ30() map[int]float64
- func (i Interop) LaneSummary() []LaneSummary
- func (i Interop) LaneYield() map[int]int
- func (i Interop) ReadErrorRate() map[int]map[int]float64
- func (i Interop) ReadPercentQ30() map[int]map[int]float64
- func (i Interop) ReadSummary() []ReadSummary
- func (i Interop) RunErrorRate() float64
- func (i Interop) RunPercentOccupied() float64
- func (i Interop) RunPercentQ30() float64
- func (i Interop) RunSummary() (rs RunSummary)
- func (i Interop) Summarise() InteropSummary
- func (i Interop) TileErrorRate() map[string]float64
- func (i Interop) TilePercentQ30() map[string]float64
- func (i Interop) TileSummary() []TileSummaryRecord
- func (i Interop) TotalFracOccupied() float64
- func (i Interop) TotalYield() int
- type InteropSummary
- type LT
- type LTC
- type LaneSummary
- type OptionalFloat
- type QMetricRecord
- type QMetricRecordV4
- type QMetricRecordV6
- type QMetricRecordV7
- type QMetrics
- type ReadInfo
- type ReadSummary
- type RunInfo
- type RunParameters
- type RunSummary
- type RunningAverage
- type TileCode
- type TileCycle
- type TileCycleV2
- type TileCycleV3
- type TileCycleV4
- type TileMetrics
- func (m TileMetrics) Clusters() int
- func (m TileMetrics) FractionPassingFilter() float64
- func (m TileMetrics) LaneClusters() map[int]int
- func (m TileMetrics) LaneDensity() map[int]float64
- func (m TileMetrics) LanePercentAligned() map[int]float64
- func (m TileMetrics) LanePfClusters() map[int]int
- func (m TileMetrics) PercentAligned() float64
- func (m TileMetrics) PfClusters() int
- func (m TileMetrics) ReadPercentAligned() map[int]map[int]float64
- func (m TileMetrics) RunDensity() float64
- type TileRecord
- type TileSummaryRecord
Constants ¶
const ( TileClusterCountOccupied = 0 TileClusterDensity = 100 TileClusterDensityPf = 101 TileClusterCount = 102 TileClusterCountPf = 103 TilePhasing = 200 TilePrephasing = 201 TilePercentAligned = 300 TileControlLane = 400 )
Variables ¶
This section is empty.
Functions ¶
func IdentifyFlowcell ¶
Get the flowcell name from the flowcell ID.
func IdentifyPlatform ¶
Get the platform name from the sequencer ID.
func PlatformReadyMarker ¶
Types ¶
type BinDefinition ¶
type Consumable ¶
type Consumable struct { Type string `bson:"type" json:"type"` Name string `bson:"name,omitzero" json:"name,omitzero"` Version string `bson:"version,omitzero" json:"version,omitzero"` Mode string `bson:"mode,omitzero" json:"mode,omitzero"` SerialNumber string `bson:"serial_number" json:"serial_number"` PartNumber string `bson:"part_number" json:"part_number"` LotNumber string `bson:"lot_number" json:"lot_number"` ExpirationDate time.Time `bson:"expiration_date" json:"expiration_date"` }
type CorrectedIntensity ¶
func ParseCorrectedIntensity ¶
func ParseCorrectedIntensity(r io.Reader) (CorrectedIntensity, error)
func ReadCorrectedIntensity ¶
func ReadCorrectedIntensity(filename string) (CorrectedIntensity, error)
type ErrorMetricRecord ¶
type ErrorMetrics ¶
type ErrorMetrics struct { Header Records []ErrorMetricRecord }
func ReadErrorMetrics ¶
func ReadErrorMetrics(path string) (ErrorMetrics, error)
type ExtTileMetricRecord ¶
type ExtTileMetrics ¶
type ExtTileMetrics struct { Header Records []ExtTileMetricRecord }
func ReadExtendedTileMetrics ¶
func ReadExtendedTileMetrics(filename string) (ExtTileMetrics, error)
func (ExtTileMetrics) LaneOccupiedClusters ¶
func (m ExtTileMetrics) LaneOccupiedClusters() map[int]int
func (ExtTileMetrics) OccupiedClusters ¶
func (m ExtTileMetrics) OccupiedClusters() int
type FlowcellInfo ¶
type FlowcellInfo struct { Lanes int `xml:"LaneCount,attr" bson:"lanes" json:"lanes"` Swaths int `xml:"SwathCount,attr" bson:"swaths" json:"swaths"` Tiles int `xml:"TileCount,attr" bson:"tiles" json:"tiles"` Surfaces int `xml:"SurfaceCount,attr" bson:"surfaces" json:"surfaces"` SectionPerLane int `xml:"SectionPerLane,attr,omitempty" bson:"section_per_lane,omitzero" json:"section_per_lane,omitzero"` }
type IndexMetricRecord ¶
type IndexMetrics ¶
type IndexMetrics struct { Version uint8 Records []IndexMetricRecord }
func ReadIndexMetrics ¶
func ReadIndexMetrics(path string) (IndexMetrics, error)
func (IndexMetrics) SampleYield ¶
func (m IndexMetrics) SampleYield() map[string]int
func (IndexMetrics) TotalYield ¶
func (m IndexMetrics) TotalYield() int
type IndexSummary ¶
type IndexSummary struct { TotalReads int `bson:"total_reads" json:"total_reads"` PfReads int `bson:"pf_reads" json:"pf_reads"` IdReads int `bson:"id_reads" json:"id_reads"` UndeterminedReads int `bson:"undetermined_reads" json:"undetermined_reads"` PercentId OptionalFloat `bson:"percent_id" json:"percent_id"` PercentUndetermined OptionalFloat `bson:"percent_undetermined" json:"percent_undetermined"` Indexes []IndexSummaryRecord `bson:"indexes" json:"indexes"` }
type IndexSummaryRecord ¶
type Interop ¶
type Interop struct { RunParameters RunParameters RunInfo RunInfo QMetrics QMetrics TileMetrics TileMetrics ExtendedTileMetrics ExtTileMetrics ErrorMetrics ErrorMetrics IndexMetrics IndexMetrics // contains filtered or unexported fields }
Interop is the representation of Illumina Interop data.
func InteropFromDir ¶
InteropFromDir creates an Interop object from an Illumina run directory. This makes some assumptions when it comes to the paths of individual files.
func (Interop) IndexSummary ¶
func (i Interop) IndexSummary() IndexSummary
func (Interop) LaneErrorRate ¶
LaneErrorRate calculates the average error rate for each lane of the flow cell. It is calculated from the lane averages produced by `Interop.ReadErrorRate`.
func (Interop) LaneFracOccupied ¶
TotalFracOccupied returns the fraction of occupied clusters per lane.
func (Interop) LanePercentQ30 ¶
LanePercentQ30 calculates the fraction of passing filter clusters with a Q score >= 30 for each lane on the flowcell. It is calculated by first getting the Q30 fraction for each read in each lane and then averaging these for each lane.
func (Interop) LaneSummary ¶
func (i Interop) LaneSummary() []LaneSummary
func (Interop) ReadErrorRate ¶
ReadErrorRate calculates the average error rate for reads, on a per lane basis. It works by first calculating the average error rate across all usable cycles for each tile. These are then averaged for each tile for a given lane. The return value is a nested map where the first key is the read number and the second key is the lane number.
func (Interop) ReadPercentQ30 ¶
ReadPercentQ30 calculates the fraction of passing filter clusters with a Q score >= 30 for each lane on the flowcell. It is calculated by first getting the Q30 fraction for each read in each lane and then averaging these for each lane.
func (Interop) ReadSummary ¶
func (i Interop) ReadSummary() []ReadSummary
func (Interop) RunErrorRate ¶
RunErrorRate calculates the average error rate for each lane of the flow cell. It is the average of the lane error rates from `Interop.LaneErrorRate`.
func (Interop) RunPercentOccupied ¶
func (Interop) RunPercentQ30 ¶
RunPercentQ30 returns the fraction of clusters with a Q score >= 30 for all passing filter clusters for a flow cell. It is calculated by summing up the number of clusters with a Q score >= 30 across all tiles.
func (Interop) RunSummary ¶
func (i Interop) RunSummary() (rs RunSummary)
func (Interop) Summarise ¶
func (i Interop) Summarise() InteropSummary
func (Interop) TileErrorRate ¶
TileErrorRate calculates the average error for all tiles over usable cycles for the whole flow cell.
func (Interop) TilePercentQ30 ¶
TilePercentQ30 calculates the Q30 across all usable cycles for each tile on the flow cell. The return value is a map with tile names as keys and the percent Q30 as values. If Q30 is not represented in the bin definitions, nil will be returned.
func (Interop) TileSummary ¶
func (i Interop) TileSummary() []TileSummaryRecord
func (Interop) TotalFracOccupied ¶
TotalFracOccupied returns the fraction of occupied clusters across the whole flow cell.
func (Interop) TotalYield ¶
TotalYield returns the total yield for the sequencing run in bases.
type InteropSummary ¶
type InteropSummary struct { RunId string `bson:"run_id" json:"run_id"` Platform string `bson:"platform" json:"platform"` Flowcell string `bson:"flowcell" json:"flowcell"` Date time.Time `bson:"date" json:"date"` RunSummary RunSummary `bson:"run_summary" json:"run_summary"` TileSummary []TileSummaryRecord `bson:"tile_summary" json:"tile_summary"` LaneSummary []LaneSummary `bson:"lane_summary" json:"lane_summary"` IndexSummary IndexSummary `bson:"index_summary" json:"index_summary"` ReadSummary []ReadSummary `bson:"read_summary" json:"read_summary"` }
type LaneSummary ¶
type LaneSummary struct { Lane int `bson:"lane" json:"lane"` Yield int `bson:"yield" json:"yield"` ErrorRate OptionalFloat `bson:"error_rate" json:"error_rate"` Density OptionalFloat `bson:"density" json:"density"` }
type OptionalFloat ¶
type OptionalFloat float64
func (OptionalFloat) IsNaN ¶
func (f OptionalFloat) IsNaN() bool
func (OptionalFloat) MarshalJSON ¶
func (f OptionalFloat) MarshalJSON() ([]byte, error)
type QMetricRecord ¶
func (QMetricRecord) BaseCount ¶
func (qmr QMetricRecord) BaseCount() int
type QMetricRecordV4 ¶
type QMetricRecordV4 = QMetricRecordV6
type QMetricRecordV6 ¶
type QMetricRecordV6 struct { Histogram []uint32 // contains filtered or unexported fields }
type QMetricRecordV7 ¶
type QMetricRecordV7 struct { Histogram []uint32 // contains filtered or unexported fields }
type QMetrics ¶
type QMetrics struct { Header HasBins bool Bins uint8 BinDefs []BinDefinition Records []QMetricRecord }
func ReadQMetrics ¶
func (QMetrics) TotalYield ¶
type ReadInfo ¶
type ReadInfo struct { Name string `bson:"name,omitzero" json:"name,omitzero"` Number int `xml:"Number,attr" bson:"number,omitzero" json:"number,omitzero"` Cycles int `xml:"NumCycles,attr" bson:"cycles" json:"cycles"` IsIndex bool `xml:"IsIndexedRead,attr" bson:"is_index" json:"is_index"` IsRevComp bool `xml:"IsReverseComplemented,attr" bson:"is_revcomp" json:"is_revcomp"` }
type ReadSummary ¶
type ReadSummary struct { Read int `bson:"read" json:"read"` Lane int `bson:"lane" json:"lane"` PercentQ30 float64 `bson:"percent_q30" json:"percent_q30"` PercentAligned OptionalFloat `bson:"percent_aligned" json:"percent_aligned"` ErrorRate OptionalFloat `bson:"error_rate" json:"error_rate"` }
type RunInfo ¶
type RunInfo struct { Version int `bson:"version" json:"version"` RunId string `bson:"run_id" json:"run_id"` RunNumber int `bson:"run_number" json:"run_number"` Date time.Time `bson:"date" json:"date"` Platform string `bson:"platform" json:"platform"` FlowcellName string `bson:"flowcell_name" json:"flowcell_name"` InstrumentId string `bson:"instrument_id" json:"instrument_id"` FlowcellId string `bson:"flowcell_id" json:"flowcell_id"` Reads []ReadInfo `bson:"reads" json:"reads"` Flowcell FlowcellInfo `bson:"flowcell" json:"flowcell"` }
RunInfo is the representation of an Illumina RunInfo.xml file.
func ReadRunInfo ¶
ReadRunInfo reads an Illumina RunInfo.xml file.
func (RunInfo) NonIndexReadCount ¶
NonIndexReadCount returns the number of non-index reads configured for the run.
type RunParameters ¶
type RunParameters struct { ExperimentName string `bson:"experiment_name" json:"experiment_name"` Side string `bson:"side,omitzero" json:"side,omitzero"` Flowcell Consumable `bson:"flowcell" json:"flowcell"` Consumables []Consumable `bson:"consumables" json:"consumables"` }
func ParseRunParameters ¶
func ParseRunParameters(r io.Reader) (RunParameters, error)
func ReadRunParameters ¶
func ReadRunParameters(filename string) (RunParameters, error)
type RunSummary ¶
type RunSummary struct { Yield int `bson:"yield" json:"yield"` Density OptionalFloat `bson:"density" json:"density"` PercentQ30 OptionalFloat `bson:"percent_q30,omitempty" json:"percent_q30,omitempty"` ClusterCount int `bson:"cluster_count" json:"cluster_count"` PfClusterCount int `bson:"pf_cluster_count" json:"pf_cluster_count"` PercentPf OptionalFloat `bson:"percent_pf" json:"percent_pf"` PercentAligned OptionalFloat `bson:"percent_aligned,omitempty" json:"percent_aligned"` ErrorRate OptionalFloat `bson:"error_rate,omitempty" json:"error_rate,omitempty"` PercentOccupied OptionalFloat `bson:"percent_occupied,omitempty" json:"percent_occupied,omitempty"` }
type RunningAverage ¶
type RunningAverage struct { Average float64 // contains filtered or unexported fields }
func NewRunningAverage ¶
func NewRunningAverage() RunningAverage
func (*RunningAverage) Add ¶
func (r *RunningAverage) Add(val float64)
type TileCycleV2 ¶
type TileCycleV2 struct { AveIntensity uint16 AChannelIntensity uint16 CChannelIntensity uint16 GChannelIntensity uint16 TChannelIntensity uint16 AClusterIntensity uint16 CClusterIntensity uint16 GClusterIntensity uint16 TClusterIntensity uint16 NCount uint32 ACount uint32 CCount uint32 GCount uint32 TCount uint32 SNRatio float32 // contains filtered or unexported fields }
func (TileCycleV2) NBases ¶
func (r TileCycleV2) NBases() int
type TileCycleV3 ¶
type TileCycleV3 struct { AIntensity uint16 CIntensity uint16 GIntensity uint16 TIntensity uint16 NCount uint32 ACount uint32 CCount uint32 GCount uint32 TCount uint32 // contains filtered or unexported fields }
func (TileCycleV3) NBases ¶
func (r TileCycleV3) NBases() int
type TileCycleV4 ¶
type TileCycleV4 struct { NCount uint32 ACount uint32 CCount uint32 GCount uint32 TCount uint32 // contains filtered or unexported fields }
func (TileCycleV4) NBases ¶
func (r TileCycleV4) NBases() int
type TileMetrics ¶
type TileMetrics struct { Header LaneCount int Density float64 Records []TileRecord }
func ReadTileMetrics ¶
func ReadTileMetrics(filename string) (tm TileMetrics, err error)
func (TileMetrics) Clusters ¶
func (m TileMetrics) Clusters() int
Clusters returns the total number of clusters.
func (TileMetrics) FractionPassingFilter ¶
func (m TileMetrics) FractionPassingFilter() float64
FractionPassingFilter returns the fraction of clusters passing filters.
func (TileMetrics) LaneClusters ¶
func (m TileMetrics) LaneClusters() map[int]int
func (TileMetrics) LaneDensity ¶
func (m TileMetrics) LaneDensity() map[int]float64
func (TileMetrics) LanePercentAligned ¶
func (m TileMetrics) LanePercentAligned() map[int]float64
func (TileMetrics) LanePfClusters ¶
func (m TileMetrics) LanePfClusters() map[int]int
func (TileMetrics) PercentAligned ¶
func (m TileMetrics) PercentAligned() float64
func (TileMetrics) PfClusters ¶
func (m TileMetrics) PfClusters() int
PfClusters returns the number of passing filter clusters.
func (TileMetrics) ReadPercentAligned ¶
func (m TileMetrics) ReadPercentAligned() map[int]map[int]float64
func (TileMetrics) RunDensity ¶
func (m TileMetrics) RunDensity() float64
type TileRecord ¶
type TileSummaryRecord ¶
type TileSummaryRecord struct { LT Name string ClusterCount int `bson:"cluster_count" json:"cluster_count"` PFClusterCount int `bson:"pf_cluster_count" json:"pf_cluster_count"` PercentOccupied OptionalFloat `bson:"percent_occupied" json:"percent_occupied"` PercentPF OptionalFloat `bson:"percent_pf" json:"percent_pf"` PercentQ30 OptionalFloat `bson:"percent_q30" json:"percent_q30"` PercentAligned OptionalFloat `bson:"percent_aligned" json:"percent_aligned"` ErrorRate OptionalFloat `bson:"error_rate" json:"error_rate"` }