本文整理汇总了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")
}