예제 #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
}