Documentation ¶
Overview ¶
Package pals implements functions and methods required for PALS sequence alignment.
Index ¶
- Constants
- Variables
- type Contig
- type Feature
- type Logger
- type PALS
- func (p *PALS) Align(complement bool) (dp.Hits, error)
- func (p *PALS) AlignFrom(traps filter.Trapezoids, complement bool) (dp.Hits, 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)
- func (p *PALS) Trapezoids() filter.Trapezoids
- type Packed
- type Packer
- type Pair
- type PairFilter
- type Pile
- type Piler
- type Writer
Constants ¶
const ( MaxIGap = 5 DiffCost = 3 SameCost = 1 MatchCost = DiffCost + SameCost BlockCost = DiffCost * MaxIGap RMatchCost = float64(DiffCost) + 1 )
Default filter and dynamic programming Cost values.
Variables ¶
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 Contig ¶
type Contig string
A Contig is a base feature type. Other features in the pals package point to this type in their location fields.
func (Contig) Description ¶
Description returns the string "contig".
type Feature ¶
A Feature is a description of a pals feature interval.
func (*Feature) Description ¶
Description returns the string "pals feature".
type Logger ¶
type Logger interface { Print(v ...interface{}) Printf(format string, v ...interface{}) }
Interface for logger used by PALS.
type PALS ¶
type PALS struct { FilterParams *filter.Params DPParams *dp.Params dp.Costs // 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 *linear.Seq, selfComp bool, m *morass.Morass, tubeOffset int, mem *uintptr, log Logger) *PALS
Return a new PALS aligner. Requires
func (*PALS) AlignFrom ¶
AlignFrom performs filtering and alignment for one strand of query using the provided filter trapezoids as seeds.
func (*PALS) AvgIndexListLength ¶
Return an estimate of the average number of hits for any given kmer.
func (*PALS) CleanUp ¶
Remove file system 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.
func (*PALS) Optimise ¶
Optimise the PALS parameters for given memory, kmer length, hit length and sequence identity. An error is returned if no satisfactory parameters can be found.
func (*PALS) Trapezoids ¶
func (p *PALS) Trapezoids() filter.Trapezoids
Trapezoids returns the filter trapezoids identified during a call to Align.
type Packer ¶
type Packer struct {
// contains filtered or unexported fields
}
A Packer collects a set of sequence into a Packed sequence.
func (*Packer) FinalisePack ¶
Finalise the sequence packing.
type Pair ¶
type Pair struct {
A, B *Feature
Score int // Score of alignment between features.
Error float64 // Identity difference between feature sequences.
Strand seq.Strand // Strand relationship: seq.Plus indicates same strand, seq.Minus indicates opposite strand.
}
A Pair holds a pair of features with additional information relating the two.
func ExpandFeature ¶
ExpandFeature converts a *gff.Feature containing PALS-type feature attributes into a Pair.
type PairFilter ¶
A PairFilter is used to determine whether a Pair's images are included in a Pile.
type Pile ¶
type Pile struct { From int To int Strand seq.Strand Loc feat.Feature Images []*Feature graph.Node }
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.
func (*Pile) Description ¶
Description returns the string "pile".
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 ¶
Add adds a feature pair to the piler incorporating the features into piles where appropriate.
func (*Piler) Piles ¶
func (p *Piler) Piles(f PairFilter) []*Pile
Piles returns a slice of piles determined by application of the filter function f to the feature pairs that have been added to the piler. Piles may be called more than once, but the piles returned in earlier invocations will be altered by subsequent calls.
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. |