Documentation ¶
Overview ¶
Package seq provides the base for storage and manipulation of biological sequence information.
A variety of sequence types are provided by derived packages including nucleic and protein sequence with and without quality scores. Multiple sequence data is also supported as unaligned sets and aligned sequences.
Quality scoring is based on Phred scores, although there is the capacity to interconvert between Phred and Solexa scores and a Solexa quality package is provide, though not integrated.
Index ¶
Constants ¶
const ( Start = 1 << iota End )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Aligner ¶
type Aligner interface { Column(pos int) []alphabet.Letter // Return the letter elements for all sub-polymers at a specific index. ColumnQL(pos int) []alphabet.QLetter // Return the quality letter elements for all sub-polymers at a specific index. }
An Aligner is a polymer type whose sub-polymers are aligned.
type Appender ¶
type Appender interface { AppendLetters(...alphabet.Letter) error AppendQLetters(...alphabet.QLetter) error }
An Appender can append letters.
type Circular ¶
type Circular interface { IsCircular() bool // Return whether the sequence is circular. Circular(bool) // Specify whether the sequence is circular. }
The Circular interface includes the methods required for sequences that can be circular.
type Complementer ¶
type Complementer interface {
RevComp() // Reverse complement the polymer.
}
A Complementer type can be reverse complemented.
type Composer ¶
type Composer interface {
Compose(f feat.FeatureSet) error // Join segments described by f, returning any error.
}
A Composer can join together segments of the polymer in any order, potentially repeatedly.
type Counter ¶
type Counter interface {
Count() int // Return the number of sub-polymers recursively.
}
A Counter is a polymer type returns the number of polymers it contains.
type Encoder ¶
type Encoder interface { Encoding() alphabet.Encoding // Return the score encoding scheme. SetEncoding(alphabet.Encoding) // Set the score encoding scheme. QEncode(pos Position) byte // Encode the quality at pos according the the encoding scheme. QDecode(l byte) alphabet.Qphred // Decode the l into a Qphred according the the encoding scheme. }
An Encoder is a type that can encode Phred-based scoring information.
type Feature ¶
type Feature interface { Name() *string // Return the ID of the polymer. Description() *string // Return the description of the polymer. Location() *string // Return the location of the polymer. Start() int // Return the start position of the polymer. End() int // Return the end position of the polymer. Len() int // Return the length of the polymer. }
A Feature is an entity with a name, description, size and location. At some point this will move into new Feature package.
type Joiner ¶
type Joiner interface {
Join(Joiner, int) error // Join another polymer at end specified, returning any error.
}
A Joiner would be a type that can join another polymer. This interface is advisory. All polymers should satisfy the intent of this interface taking their own type only.
type Letterer ¶
type Letterer interface { At(Position) alphabet.QLetter // Return the letter at a specific position. Set(Position, alphabet.QLetter) // Set the letter at a specific position. }
A Letterer gets and sets letters.
type Polymer ¶
type Polymer interface { Raw() interface{} // Return a pointer the underlying polymer data unless the data is a pointer type, then return the data. Feature Offset(int) // Set the offset of the polymer. Circular Reverser Composer Stitcher Truncator String() string }
Polymer is the base type for sequences.
type Position ¶
type Position struct { Pos int // The index of a letter within a sequence. Ind int // The specific sequence within a multiple sequence. }
A Position holds a sequence position for all sequence types.
type Quality ¶
type Quality interface { Scorer At(Position) alphabet.Qphred Set(Position, alphabet.Qphred) Subseq(start, end int) (Quality, error) // Return a subsequence of the polymer from start to end or an error. Copy() Quality // Return a copy of the Quality. }
A Quality is a Polymer whose elements are Phred scores.
type Reverser ¶
type Reverser interface {
Reverse() // Reverse the order of elements in the polymer.
}
A Reverse type can Reverse itself.
type Scorer ¶
type Scorer interface { EAt(Position) float64 // Return the p(Error) for a specific position. SetE(Position, float64) // Set the p(Error) for a specific position. Encoder }
A Scorer is a type that provides Phred-based scoring information.
type Sequence ¶
type Sequence interface { Letterer Counter Alphabet() alphabet.Alphabet // Return the Alphabet being used. Subseq(start, end int) (Sequence, error) // Return a subsequence of the polymer from start to end or an error. Copy() Sequence // Return a copy of the Sequence. }
A Sequence is a polymer whose elements are letters.
type Stitcher ¶
type Stitcher interface {
Stitch(f feat.FeatureSet) error // Join segments described by f, returning any error.
}
A Stitcher can join together sequentially ordered disjunct segments of the polymer.
Directories ¶
Path | Synopsis |
---|---|
Package nucleic provides support for manipulation of single nucleic acid sequences with and without quality data.
|
Package nucleic provides support for manipulation of single nucleic acid sequences with and without quality data. |
alignment
Package alignment handles aligned sequences stored as columns.
|
Package alignment handles aligned sequences stored as columns. |
multi
Package multi handles collections of sequences as alignments or sets.
|
Package multi handles collections of sequences as alignments or sets. |
packed
Package packed provides support for manipulation of single nucleic acid sequences with and without quality data.
|
Package packed provides support for manipulation of single nucleic acid sequences with and without quality data. |
Package protein provides support for manipulation of single protein sequences with and without quality data.
|
Package protein provides support for manipulation of single protein sequences with and without quality data. |
alignment
Package alignment handles aligned sequences stored as columns.
|
Package alignment handles aligned sequences stored as columns. |
multi
Package multi handles collections of sequences as alignments or sets.
|
Package multi handles collections of sequences as alignments or sets. |
Package quality provides support for manipulation of quality data in generic Phred format.
|
Package quality provides support for manipulation of quality data in generic Phred format. |
illumina
Package illumina provides support for manipulation of quality data in Illumina format.
|
Package illumina provides support for manipulation of quality data in Illumina format. |
sanger
Package sanger provides support for manipulation of quality data in Sanger format.
|
Package sanger provides support for manipulation of quality data in Sanger format. |
solexa
Package solexa provides support for manipulation of quality data in Solexa format.
|
Package solexa provides support for manipulation of quality data in Solexa format. |
Package sequtils provides generic functions for manipulation of slices used in the seq types.
|
Package sequtils provides generic functions for manipulation of slices used in the seq types. |