示例#1
0
文件: qseq.go 项目: frogs/biogo
// Join segments of the sequence, returning any error.
func (self *QSeq) Compose(f feat.FeatureSet) (err error) {
	tt, err := sequtils.Compose(self.S, self.offset, f)
	if err == nil {
		s := []alphabet.QLetter{}
		for _, ts := range tt {
			s = append(s, ts.([]alphabet.QLetter)...)
		}

		self.S = s
		self.circular = false
		self.offset = 0
	}

	return
}
示例#2
0
文件: solexa.go 项目: frogs/biogo
func (self *Solexa) Compose(f feat.FeatureSet) (err error) {
	tt, err := sequtils.Compose(self.S, self.offset, f)
	if err == nil {
		s := []alphabet.Qsolexa{}
		for i, ts := range tt {
			if f[i].Strand == -1 {
				s = append(s, sequtils.Reverse(ts).([]alphabet.Qsolexa)...)
			} else {
				s = append(s, ts.([]alphabet.Qsolexa)...)
			}
		}

		self.S = s
		self.circular = false
		self.offset = 0
	}

	return
}
示例#3
0
文件: qpacked.go 项目: frogs/biogo
// Join segments of the sequence, returning any error.
func (self *QSeq) Compose(f feat.FeatureSet) (err error) {
	tt, err := sequtils.Compose(self.S, self.offset, f)
	if err == nil {
		s := []alphabet.QPack{}
		for i, ts := range tt {
			if f[i].Strand == -1 {
				s = append(s, self.revComp(ts.([]alphabet.QPack))...)
			} else {
				s = append(s, ts.([]alphabet.QPack)...)
			}
		}

		self.S = s
		self.circular = false
		self.offset = 0
	}

	return
}
示例#4
0
文件: seq.go 项目: frogs/biogo
// Join segments of the sequence, returning any error.
func (self *Seq) Compose(f feat.FeatureSet) (err error) {
	tt, err := sequtils.Compose(self.S, self.offset, f)
	if err == nil {
		s := []alphabet.Letter{}
		complement := self.alphabet.ComplementTable()
		for i, ts := range tt {
			if f[i].Strand == -1 {
				s = append(s, self.revComp(ts.([]alphabet.Letter), complement)...)
			} else {
				s = append(s, ts.([]alphabet.Letter)...)
			}
		}

		self.S = s
		self.circular = false
		self.offset = 0
	}

	return
}