Пример #1
0
// Set the quality at position pos to e to reflect the given p(Error).
func (self *QSeq) SetE(pos seq.Position, e float64) {
	if pos.Ind != 0 {
		panic("packed: index out of range")
	}
	self.S[pos.Pos-self.offset] &^= ((1 << 6) - 1) << 2
	self.S[pos.Pos-self.offset] = alphabet.QPack(alphabet.Ephred(e)) << 2
}
Пример #2
0
// Set the letter at position pos to l.
func (self *QSeq) Set(pos seq.Position, l alphabet.QLetter) {
	if pos.Ind != 0 {
		panic("packed: index out of range")
	}
	self.S[pos.Pos-self.offset] = alphabet.QPack(self.alphabet.IndexOf(l.L)) | alphabet.QPack(l.Q)<<2
}