Documentation ¶
Overview ¶
Package implementing functions required for PALS sequence alignment
Index ¶
- Variables
- type ContainQuery
- type FeaturePair
- type Logger
- type PALS
- func (p *PALS) Align(complement bool) (dp.DPHits, error)
- func (p *PALS) AvgIndexListLength(filterParams *filter.Params) float64
- func (p *PALS) BuildIndex() error
- func (p *PALS) CleanUp() error
- func (p *PALS) MemRequired(filterParams *filter.Params) uintptr
- func (p *PALS) Optimise(minHitLen int, minId float64) error
- func (p *PALS) Share(m *PALS)
- type Packer
- type Pile
- type PileFilter
- type PileInterval
- type Piler
- type Writer
Constants ¶
This section is empty.
Variables ¶
var ( MaxIGap = 5 DiffCost = 3 SameCost = 1 MatchCost = DiffCost + SameCost BlockCost = DiffCost * MaxIGap RMatchCost = float64(DiffCost) + 1 )
Default values for filter and alignment.
var ( DefaultLength = 400 DefaultMinIdentity = 0.94 MaxAvgIndexListLen = 15.0 TubeOffsetDelta = 32 )
Default thresholds for filter and alignment.
var ( MinWordLength = 4 // For minimum word length, choose k=4 arbitrarily. MaxKmerLen = 15 // Currently limited to 15 due to 32 bit int limit for indexing slices )
Default word characteristics.
Functions ¶
This section is empty.
Types ¶
type ContainQuery ¶
func (*ContainQuery) ID ¶
func (q *ContainQuery) ID() uintptr
func (*ContainQuery) Overlap ¶
func (q *ContainQuery) Overlap(b interval.IntRange) bool
func (*ContainQuery) Range ¶
func (q *ContainQuery) Range() interval.IntRange
type FeaturePair ¶
type FeaturePair struct {
A, B *feat.Feature
Score int // Score of alignment between features.
Error float64 // Identity difference between feature sequences.
Strand int8 // Strand relationship: positive indicates same strand, negative indicates opposite strand.
}
A FeaturePair holds a pair of features with additional information relating the two.
func ExpandFeature ¶
func ExpandFeature(f *feat.Feature) (*FeaturePair, error)
Expand a feat.Feature containing a PALS-type feature attribute into a FeaturePair.
func NewFeaturePair ¶
Convert a DPHit and two packed sequences into a FeaturePair.
func (*FeaturePair) Invert ¶
func (fp *FeaturePair) Invert() *FeaturePair
Invert returns a reversed copy of the feature pair such that A', B' = B, A.
type Logger ¶
type Logger interface { Print(v ...interface{}) Printf(format string, v ...interface{}) Println(v ...interface{}) Fatal(v ...interface{}) Fatalf(format string, v ...interface{}) Fatalln(v ...interface{}) }
Interface for logger used by PALS.
type PALS ¶
type PALS struct { FilterParams *filter.Params DPParams *dp.Params MaxIGap int DiffCost int SameCost int MatchCost int BlockCost int RMatchCost float64 // contains filtered or unexported fields }
PALS is a type that can perform pairwise alignments of large sequences based on the papers:
PILER: identification and classification of genomic repeats. Robert C. Edgar and Eugene W. Myers. Bioinformatics Suppl. 1:i152-i158 (2005) 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).
func New ¶
func New(target, query *seq.Seq, selfComp bool, m *morass.Morass, threads, tubeOffset int, mem *uintptr, log Logger) *PALS
Return a new PALS aligner. Requires
func (*PALS) AvgIndexListLength ¶
Return an estimate of the average number of hits for any given kmer.
func (*PALS) CleanUp ¶
Remove filesystem components of filter. This should be called after the last use of the aligner.
func (*PALS) MemRequired ¶
Return an estimate of the total amount of memory required.
type Pile ¶
type Pile struct { Pile *feat.Feature Images []*FeaturePair }
A Pile is a collection of features covering a maximal (potentially contiguous, depending on the value of overlap used for creation of the Piler) region of copy count > 0.
type PileFilter ¶
type PileFilter func(a, b *feat.Feature, pa, pb *PileInterval) bool
A PileFilter is used to determine whether a FeaturePair is included in a Pile
type PileInterval ¶
type PileInterval struct {
Start, End int
Location string
Pairs []*FeaturePair
// contains filtered or unexported fields
}
func (*PileInterval) ID ¶
func (i *PileInterval) ID() uintptr
func (*PileInterval) Overlap ¶
func (i *PileInterval) Overlap(b interval.IntRange) bool
func (*PileInterval) Range ¶
func (i *PileInterval) Range() interval.IntRange
type Piler ¶
type Piler struct {
// contains filtered or unexported fields
}
A Piler performs the aggregation of feature pairs according to the description in section 2.3 of Edgar and Myers (2005) using an interval tree, giving O(nlogn) time but better space complexity and flexibility with feature overlap.
func (*Piler) Add ¶
func (p *Piler) Add(fp *FeaturePair) error
Add adds a feature pair to the piler incorporating the features into piles where appropriate.
func (*Piler) Pile ¶
func (p *Piler) Pile(q *ContainQuery) (*PileInterval, error)
Pile returns the interval representation of the pile containing i. An error is returned if more than one pile would be returned.
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
PALS pair writer type.
func NewWriter ¶
func NewWriter(f io.WriteCloser, v, width int, header bool) (w *Writer)
Returns a new PALS writer using f.
func NewWriterName ¶
Returns a new PALS writer using a filename, truncating any existing file. If appending is required use NewWriter and os.OpenFile.
Directories ¶
Path | Synopsis |
---|---|
Package providing PALS dynamic programming alignment routines.
|
Package providing PALS dynamic programming alignment routines. |
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.
|
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. |