mirror of
https://github.com/metabarcoding/obitools4.git
synced 2025-12-08 08:40:26 +00:00
Reduce redundante call to bytes.ToLower and substitute the last call by an home made version doing the conversion in place
Former-commit-id: d9ea22f649d97be352f8dbb37acc1495df830118
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package obiformats
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"compress/gzip"
|
||||
"encoding/csv"
|
||||
"fmt"
|
||||
@@ -70,7 +69,7 @@ func __read_ecopcr_bioseq__(file *__ecopcr_file__) (*obiseq.BioSequence, error)
|
||||
comment = strings.TrimSpace(record[19])
|
||||
}
|
||||
|
||||
bseq := obiseq.NewBioSequence(name, bytes.ToLower(sequence), comment)
|
||||
bseq := obiseq.NewBioSequence(name, sequence, comment)
|
||||
annotation := bseq.Annotations()
|
||||
|
||||
annotation["ac"] = name
|
||||
|
||||
@@ -141,10 +141,10 @@ func _ParseEmblFile(source string, input <-chan _FileChunk, out obiiter.IBioSequ
|
||||
}
|
||||
case line == "//":
|
||||
sequence := obiseq.NewBioSequence(id,
|
||||
bytes.ToLower(seqBytes.Bytes()),
|
||||
seqBytes.Bytes(),
|
||||
defBytes.String())
|
||||
sequence.SetSource(source)
|
||||
|
||||
|
||||
sequence.SetFeatures(featBytes.Bytes())
|
||||
|
||||
annot := sequence.Annotations()
|
||||
|
||||
@@ -7,7 +7,6 @@ package obiformats
|
||||
import "C"
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"os"
|
||||
"path"
|
||||
@@ -42,7 +41,7 @@ func _FastseqReader(source string,
|
||||
comment = ""
|
||||
}
|
||||
|
||||
rep := obiseq.NewBioSequence(name, bytes.ToLower(sequence), comment)
|
||||
rep := obiseq.NewBioSequence(name, sequence, comment)
|
||||
rep.SetSource(source)
|
||||
if s.qual.l > C.ulong(0) {
|
||||
cquality := unsafe.Slice(s.qual.s, C.int(s.qual.l))
|
||||
|
||||
@@ -69,7 +69,7 @@ func _ParseGenbankFile(source string,
|
||||
case line == "//":
|
||||
log.Debugln("Total lines := ", nl)
|
||||
sequence := obiseq.NewBioSequence(id,
|
||||
bytes.ToLower(seqBytes.Bytes()),
|
||||
seqBytes.Bytes(),
|
||||
defBytes.String())
|
||||
sequence.SetSource(source)
|
||||
state = inHeader
|
||||
|
||||
Reference in New Issue
Block a user