Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var SkipBase byte = '.'
SkipBase holds the byte used for a Skip Operation.
Functions ¶
func FirstMatch ¶
FirstMatch reports the first base in the read that matches the reference.
func ReadPieces ¶
ReadPieces gives the offsets into the cigar that consome reference bases.
Types ¶
type Align ¶
type Align struct {
*sam.Record
// track the into the Cigar Ops.
CursorCigar int
// track basepairs into the Reference
CursorPos int
// track basepairs into the read
CursorRead int
// Sequence holds the expanded sequence.
Sequence []byte
// contains filtered or unexported fields
}
Align is a sam.Record with a cursor to track position in the read and reference.
func (*Align) At ¶
func (a *Align) At(pos0 int) *CigarSummary
At returns the CigarOp for a particular genomic position of the given read.
type CigarSummary ¶
type CigarSummary struct {
At sam.CigarOp
Left sam.CigarOp
Right sam.CigarOp
Qual uint8
Head bool
Tail bool
Base byte
Insertion []byte
}
CigarSummary is a summary of the context of a position for 1 alignment
type Iterator ¶
type Iterator struct {
// contains filtered or unexported fields
}
Iterator generates piles the order they were queried. Internally, it holds a cache of alignment objects that overlap the current position. It requests new ones and drops old ones as they start or end overlapping with the (updated) pile position.
type Options ¶
type Options struct {
MinBaseQuality uint8 `arg:"-q,help:base quality threshold"`
MinMappingQuality uint8 `arg:"-Q,help:mapping quality threshold"`
ExcludeFlag uint16 `arg:"-F"`
IncludeFlag uint16 `arg:"-f"`
MinClipLength int `arg:"-c,help:only count H/S clips of at least this length"`
IncludeBases bool `arg:"-b,help:output each base and base quality score"`
SplitterVerbosity int `arg:"-s,help:0-only count; 1:count and single most frequent; 2:all SAs; 3:dont shorten positions"`
ConcordantCutoff int `arg:"-o,help:distance beyond which mates are called discordant"`
}
Options holds information about what is reported in the Pile
type Pile ¶
type Pile struct {
Chrom string
Pos int
Depth int // count of reads passing filters.
RefBase byte // Reference base a this position.
MisMatches uint32 // number of mismatches .
ProperPairs int // count of reads with paired flag
SoftStarts uint32 // counts of base preceding an 'S' cigar op
SoftEnds uint32 // ... following ...
HardStarts uint32 // counts of base preceding an 'H' cigar op
HardEnds uint32
InsertionStarts uint32 // counts of base preceding an 'I' cigar op
InsertionEnds uint32
Deletions uint32 // counts of deletions 'D' at this base
Skips uint32 // counts of skips 'N' at this base
Heads uint32 // counts of starts of reads at this base
Tails uint32 // counts of ends of reads at this base
Splitters uint32 // count of non-secondary reads with SA tags.
Splitters1 uint32 // count of non-secondary reads with exactly 1 SA tag.
Bases []byte // All bases from reads covering this position
Quals []uint8 // All quals from reads covering this position
InsertSizeLPs []int32 // All insert size for left-most of pair
InsertSizeRMs []int32 // ... right-most of pair
OrientationPlusPlus uint32 // Paired reads mapped in +/+ orientation
OrientationMinusMinus uint32 // Paired reads mapped in -/- orientation
OrientationMinusPlus uint32 // Paired reads mapped in -/+ orientation
// count of reads where splitters were in different orientation than read.
// only set if SplitterVerbosity > 1
OrientationSplitter uint32
/*
TODO: figure out how to do this because these are excluded by ExcludeFlag.
could try to calculate and it will ony be non-zero if these are not excluded.C
Duplicates uint32 // reads counted as duplicates
Supplementary uint32 // reads counted as supplementary
*/
Discordant uint32 // Number of reads with insert size > ConcordantCutoff
DiscordantChrom uint32 // Number of reads mapping on different chroms
DiscordantChromEntropy float32 // high value means all discordants came from same chrom.
GC65 uint32
GC257 uint32
Duplicity65 float32 // measure of lack of sequence entropy.
Duplicity257 float32 // measure of lack of sequence entropy.
SplitterPositions []Position
}
Pile holds the information about a single base.

