cov

package
v0.8.29 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 30, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load(bamPath string, kit string)

Load manages the loading and parsing of a BAM file given a path and a kit name.

Types

type Coverage

type Coverage uint8

type Depth

type Depth uint64

type Exon

type Exon struct {
	Chromosome     string
	Start          uint64
	End            uint64
	PositionDepth  map[Position]Depth
	DepthCoverages map[Depth]Coverage

	ID         uint
	GeneID     uint
	ExonNumber uint
}

func ExonDepth

func ExonDepth(bamPath string, chromosome string, start uint64, end uint64) Exon

ExonDepth calculates the read depth given BAM file and chromosomic coordinates, returning an Exon instance.

func NewExon

func NewExon(chromosome string, start uint64, end uint64) Exon

NewExon instantiates a new Exon struct

func NewExonsFromDB

func NewExonsFromDB() []Exon

NewExonsFromDB returns a slice of all the exons that are already loaded in the database.

func (*Exon) AddDepth

func (r *Exon) AddDepth(pos Position, depth Depth)

AddDepth increases the depth counter for a given position If the position falls outside the exon it isn't counted.

func (*Exon) AddDepthFromTo

func (r *Exon) AddDepthFromTo(fromPos Position, toPos Position, depth Depth)

AddDepthFromTo increases the depth counter for a given position range. Positions that fall outside the exon aren't counted.

func (*Exon) ComputeDepthCoverage

func (r *Exon) ComputeDepthCoverage(depth Depth) Coverage

ComputeDepthCoverage computes the coverage at the given depth.

func (*Exon) ComputeDepthCoverageRange

func (r *Exon) ComputeDepthCoverageRange(fromDepth Depth, toDepth Depth)

ComputeDepthCoverageRange computes the coverage at the given depths range. Stores the result in Exon.DepthCoverages.

func (*Exon) StoreDepthCoverages

func (r *Exon) StoreDepthCoverages(bamFileID uint)

StoreDepthCoverages computes and stores the depth coverages in the DB, under the given BAM file ID.

func (*Exon) StoreReadCounts

func (r *Exon) StoreReadCounts(bamFileID uint)

StoreReadCounts stores the read counts in the DB, under the given BAM file ID.

type Position

type Position uint64

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL