Documentation ΒΆ
Overview ΒΆ
Package providing PALS sequence hit filter routines based on 'Efficient q-gram filters for finding all π-matches over a given length.'
Kim R. Rasmussen, Jens Stoye, and Eugene W. Myers. J. of Computational Biology 13:296β308 (2006).
Index ΒΆ
Constants ΒΆ
This section is empty.
Variables ΒΆ
This section is empty.
Functions ΒΆ
func MinWordsPerFilterHit ΒΆ
Ukonnen's Lemma: U(n, q, π) := (n + 1) - q(βπnβ + 1)
Types ΒΆ
type Filter ΒΆ
type Filter struct {
// contains filtered or unexported fields
}
Filter implements a q-gram filter similar to that described in Rassmussen 2005. This implementation is a translation of the C++ code written by Edgar and Myers.
type Hit ΒΆ
Type to store individual q-gram query filter hits.
func (Hit) Less ΒΆ
This is a direct translation of the qsort compar function used by PALS. However it results in a different sort order (with respect to the non-key fields) for Hits because of differences in the underlying sort algorithms and their respective sort stability. This appears to have some impact on Hit merging.
type Merger ΒΆ
type Merger struct {
// contains filtered or unexported fields
}
A Merger aggregates and clips an ordered set of trapezoids.
func NewMerger ΒΆ
func NewMerger(ki *kmerindex.Index, query *linear.Seq, filterParams *Params, maxIGap int, selfCompare bool) *Merger
Create a new Merger using the provided kmerindex, query sequence, filter parameters and maximum inter-segment gap length. If selfCompare is true only the upper diagonal of the comparison matrix is examined.
func (*Merger) FinaliseMerge ΒΆ
func (m *Merger) FinaliseMerge() Trapezoids
Finalise the merged collection and return a sorted slice of Trapezoids.
func (*Merger) MergeFilterHit ΒΆ
Merge a filter hit into the collection.
type Trapezoid ΒΆ
type Trapezoid struct {
Top, Bottom int // B (query) coords of top and bottom of trapzoidal zone
Left, Right int // Left and right diagonals of trapzoidal zone
}
Type to store a successfully filtered w Γ e Parallelogram
type Trapezoids ΒΆ
type Trapezoids []Trapezoid
Trapezoids implements the sort.Sort interface.
func (Trapezoids) Sum ΒΆ
func (tr Trapezoids) Sum() (a, b int)
Return the sum of all Trapezoids in the slice.