本文整理匯總了Golang中code/google/com/p/biogo/exp/seq.Position類的典型用法代碼示例。如果您正苦於以下問題:Golang Position類的具體用法?Golang Position怎麽用?Golang Position使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了Position類的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: At
func (self *Multi) At(pos seq.Position) alphabet.QLetter {
var count int
for _, s := range self.S {
count = s.Count()
if pos.Ind < count {
return s.At(pos)
}
pos.Ind -= count
}
panic("index out of range")
}
示例2: Set
func (self *Multi) Set(pos seq.Position, l alphabet.QLetter) {
var count int
for _, s := range self.S {
count = s.Count()
if pos.Ind < count {
s.Set(pos, l)
return
}
pos.Ind -= count
}
panic("index out of range")
}
示例3: SetE
func (self *Multi) SetE(pos seq.Position, q float64) {
var count int
for _, s := range self.S {
if a, ok := s.(seq.Counter); ok {
count = a.Count()
} else {
count = 1
}
if pos.Ind < count {
if qs, ok := s.(seq.Quality); ok {
qs.SetE(pos, q)
return
}
}
pos.Ind -= count
}
panic("index out of range")
}
示例4: EAt
func (self *Multi) EAt(pos seq.Position) float64 {
var count int
for _, s := range self.S {
if a, ok := s.(seq.Counter); ok {
count = a.Count()
} else {
count = 1
}
if pos.Ind < count {
if qs, ok := s.(seq.Quality); ok {
return qs.EAt(pos)
} else {
return protein.DefaultQphred.ProbE()
}
}
pos.Ind -= count
}
panic("index out of range")
}