Esempio n. 1
0
// Return an unpacked sequence and quality.
func (self *QSeq) Unpack() (n *nucleic.Seq, q *quality.Phred) {
	n = nucleic.NewSeq(self.ID, alphabet.BytesToLetters([]byte(self.String())), self.alphabet)
	n.Circular(self.circular)
	n.Offset(self.offset)
	qb := make([]alphabet.Qphred, self.Len())
	for i, v := range self.S {
		qb[i] = alphabet.Qphred(v >> 2)
	}
	q = quality.NewPhred(self.ID, qb, self.encoding)
	q.Circular(self.circular)
	q.Offset(self.offset)

	return
}
Esempio n. 2
0
func NewSanger(id string, q []alphabet.Qphred) *Sanger {
	return &Sanger{quality.NewPhred(id, q, alphabet.Sanger)}
}
Esempio n. 3
0
func NewIllumina1_9(id string, q []alphabet.Qphred) *Illumina1_9 {
	return &Illumina1_9{quality.NewPhred(id, q, alphabet.Illumina1_9)}
}