mirror of
https://github.com/metabarcoding/obitools4.git
synced 2025-06-29 16:20:46 +00:00
Patch some bugs in writing files
Former-commit-id: 612868a281dc0ecf4e6c5776973735e5c71bd517
This commit is contained in:
@ -2,6 +2,7 @@ package obiseq
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"math"
|
||||
"reflect"
|
||||
"strings"
|
||||
|
||||
@ -120,8 +121,14 @@ func (sequence *BioSequence) StatsPlusOne(key string, toAdd *BioSequence, na str
|
||||
uint8, uint16, uint32, uint64,
|
||||
int8, int16, int32, int64, bool:
|
||||
sval = fmt.Sprint(value)
|
||||
case float64:
|
||||
if math.Floor(value) == value {
|
||||
sval = fmt.Sprint(int(value))
|
||||
} else {
|
||||
log.Fatalf("Trying to make stats on a float value (%v : %T)", value, value)
|
||||
}
|
||||
default:
|
||||
log.Fatalf("Trying to make stats on a none string, integer or boolean value (%v)", value)
|
||||
log.Fatalf("Trying to make stats on a none string, integer or boolean value (%v : %T)", value, value)
|
||||
}
|
||||
retval = true
|
||||
}
|
||||
|
Reference in New Issue
Block a user