Documentation ¶
Overview ¶
Package linear handles single sequences.
Index ¶
- type QSeq
- func (s *QSeq) AppendLetters(a ...alphabet.Letter) error
- func (s *QSeq) AppendQLetters(a ...alphabet.QLetter) error
- func (s *QSeq) At(i int) alphabet.QLetter
- func (s *QSeq) Clone() seq.Sequence
- func (s *QSeq) EAt(i int) float64
- func (s *QSeq) Encoding() alphabet.Encoding
- func (s *QSeq) End() int
- func (s *QSeq) Format(fs fmt.State, c rune)
- func (s *QSeq) Len() int
- func (s *QSeq) New() seq.Sequence
- func (s *QSeq) QEncode(i int) byte
- func (s *QSeq) RevComp()
- func (s *QSeq) Reverse()
- func (s *QSeq) Set(i int, l alphabet.QLetter) error
- func (s *QSeq) SetE(i int, e float64) error
- func (s *QSeq) SetEncoding(e alphabet.Encoding) error
- func (s *QSeq) SetSlice(sl alphabet.Slice)
- func (s *QSeq) Slice() alphabet.Slice
- func (s *QSeq) Start() int
- func (s *QSeq) String() string
- func (s *QSeq) Validate() (bool, int)
- type Seq
- func (s *Seq) AppendLetters(a ...alphabet.Letter) error
- func (s *Seq) AppendQLetters(a ...alphabet.QLetter) error
- func (s *Seq) At(i int) alphabet.QLetter
- func (s *Seq) Clone() seq.Sequence
- func (s *Seq) End() int
- func (s *Seq) Format(fs fmt.State, c rune)
- func (s *Seq) Len() int
- func (s *Seq) New() seq.Sequence
- func (s *Seq) RevComp()
- func (s *Seq) Reverse()
- func (s *Seq) Set(i int, l alphabet.QLetter) error
- func (s *Seq) SetSlice(sl alphabet.Slice)
- func (s *Seq) Slice() alphabet.Slice
- func (s *Seq) Start() int
- func (s *Seq) String() string
- func (s *Seq) Validate() (bool, int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type QSeq ¶
type QSeq struct { seq.Annotation Seq alphabet.QLetters Threshold alphabet.Qphred // Threshold for returning valid letter. QFilter seq.QFilter // How to represent below threshold letter. Encode alphabet.Encoding }
A QSeq is a basic linear sequence with Phred quality scores.
func NewQSeq ¶
func NewQSeq(id string, ql []alphabet.QLetter, alpha alphabet.Alphabet, enc alphabet.Encoding) *QSeq
NewQSeq create a new QSeq with the given id, letter sequence, alphabet and quality encoding.
func (*QSeq) AppendLetters ¶
Append append Letters to the sequence, the DefaultQphred value is used for quality scores.
func (*QSeq) AppendQLetters ¶
Append appends QLetters to the sequence.
func (*QSeq) End ¶
End returns the end position of the sequence in coordinates relative to the sequence location.
func (*QSeq) Format ¶
Format is a support routine for fmt.Formatter. It accepts the formats 'v' and 's' (string), 'a' (fasta) and 'q' (fastq). String, fasta and fastq formats support truncated output via the verb's precision. Fasta format supports sequence line specification via the verb's width field. Fastq format supports optional inclusion of the '+' line descriptor line with the '+' flag. The 'v' verb supports the '#' flag for Go syntax output. The 's' and 'v' formats support the '-' flag for omission of the sequence name.
func (*QSeq) QEncode ¶
QEncode encodes the quality at position pos to a letter based on the sequence encoding setting.
func (*QSeq) RevComp ¶
func (s *QSeq) RevComp()
RevComp reverse complements the sequence. RevComp will panic if the alphabet used by the receiver is not a Complementor.
func (*QSeq) Reverse ¶
func (s *QSeq) Reverse()
Reverse reverses the order of letters in the the sequence without complementing them.
func (*QSeq) SetEncoding ¶
SetEncoding sets the quality encoding scheme to e.
func (*QSeq) SetSlice ¶
SetSlice sets the sequence data represented by the sequence. SetSlice will panic if sl is not a alphabet.QLetters.
func (*QSeq) Start ¶
Start return the start position of the sequence in coordinates relative to the sequence location.
type Seq ¶
type Seq struct { seq.Annotation Seq alphabet.Letters }
A Seq is a basic linear sequence.
func (*Seq) AppendLetters ¶
Append appends Letters to the sequence.
func (*Seq) AppendQLetters ¶
Append append QLetters to the sequence, ignoring Q component.
func (*Seq) End ¶
End returns the end position of the sequence in coordinates relative to the sequence location.
func (*Seq) Format ¶
Format is a support routine for fmt.Formatter. It accepts the formats 'v' and 's' (string), 'a' (fasta) and 'q' (fastq). String, fasta and fastq formats support truncated output via the verb's precision. Fasta format supports sequence line specification via the verb's width field. Fastq format supports optional inclusion of the '+' line descriptor line with the '+' flag. The 'v' verb supports the '#' flag for Go syntax output. The 's' and 'v' formats support the '-' flag for omission of the sequence name.
func (*Seq) RevComp ¶
func (s *Seq) RevComp()
RevComp reverse complements the sequence. RevComp will panic if the alphabet used by the receiver is not a Complementor.
func (*Seq) Reverse ¶
func (s *Seq) Reverse()
Reverse reverses the order of letters in the the sequence without complementing them.
func (*Seq) SetSlice ¶
SetSlice sets the sequence data represented by the sequence. SetSlice will panic if sl is not a alphabet.Letters.
func (*Seq) Start ¶
Start returns the start position of the sequence in coordinates relative to the sequence location.