mirror of
https://github.com/metabarcoding/obitools4.git
synced 2025-06-29 16:20:46 +00:00
Xprize update
Former-commit-id: d38919a897961e4d40da3b844057c3fb94fdb6d7
This commit is contained in:
@ -415,11 +415,16 @@ func (s *BioSequence) SetTaxid(taxid int) {
|
||||
s.SetAttribute("taxid", taxid)
|
||||
}
|
||||
|
||||
func (s *BioSequence) OBITagRefIndex() map[int]string {
|
||||
func (s *BioSequence) OBITagRefIndex(slot ...string) map[int]string {
|
||||
key := "obitag_ref_index"
|
||||
|
||||
if len(slot) > 0 {
|
||||
key = slot[0]
|
||||
}
|
||||
|
||||
var val map[int]string
|
||||
|
||||
i, ok := s.GetAttribute("obitag_ref_index")
|
||||
i, ok := s.GetAttribute(key)
|
||||
|
||||
if !ok {
|
||||
return nil
|
||||
|
@ -202,4 +202,8 @@ var OBILang = gval.NewLanguage(
|
||||
scomp[string(k)] = float64(v)
|
||||
}
|
||||
return scomp, nil
|
||||
}))
|
||||
}),
|
||||
gval.Function("replace", func(args ...interface{}) (interface{}, error) {
|
||||
return strings.ReplaceAll(args[0].(string), args[1].(string), args[2].(string)), nil
|
||||
}),
|
||||
)
|
||||
|
Reference in New Issue
Block a user