mirror of
https://github.com/metabarcoding/obitools4.git
synced 2025-12-08 16:50:27 +00:00
Patch header parting and formatiing
This commit is contained in:
@@ -2,8 +2,10 @@ package obiseq
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"strings"
|
||||
|
||||
"git.metabarcoding.org/lecasofts/go/obitools/pkg/goutils"
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
type StatsOnValues map[string]int
|
||||
@@ -33,6 +35,16 @@ func (sequence *BioSequence) StatsOn(key string, na string) StatsOnValues {
|
||||
case StatsOnValues:
|
||||
stats = istat
|
||||
newstat = false
|
||||
case map[string]interface{}:
|
||||
stats = make(StatsOnValues, len(istat))
|
||||
var err error
|
||||
for k, v := range istat {
|
||||
stats[k], err = goutils.InterfaceToInt(v)
|
||||
if err != nil {
|
||||
log.Panicf("In sequence %s : %s stat tag not only containing integer values %s",
|
||||
sequence.Id(), mkey, istat)
|
||||
}
|
||||
}
|
||||
default:
|
||||
stats = make(StatsOnValues, 100)
|
||||
annotations[mkey] = stats
|
||||
|
||||
Reference in New Issue
Block a user