mirror of
https://github.com/metabarcoding/obitools4.git
synced 2025-06-29 16:20:46 +00:00
Force sequence reading to produce lowercase sequences.
Adds two columns to the obiclean ratio csv file
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
package obiformats
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"compress/gzip"
|
||||
"encoding/csv"
|
||||
"fmt"
|
||||
@ -67,7 +68,7 @@ func __read_ecopcr_bioseq__(file *__ecopcr_file__) (*obiseq.BioSequence, error)
|
||||
comment = strings.TrimSpace(record[19])
|
||||
}
|
||||
|
||||
bseq := obiseq.NewBioSequence(name, sequence, comment)
|
||||
bseq := obiseq.NewBioSequence(name, bytes.ToLower(sequence), comment)
|
||||
annotation := bseq.Annotations()
|
||||
|
||||
annotation["ac"] = name
|
||||
|
@ -128,7 +128,7 @@ func _ParseEmblFile(input <-chan _FileChunk, out obiiter.IBioSequenceBatch) {
|
||||
}
|
||||
case line == "//":
|
||||
sequence := obiseq.NewBioSequence(id,
|
||||
seqBytes.Bytes(),
|
||||
bytes.ToLower(seqBytes.Bytes()),
|
||||
defBytes.String())
|
||||
|
||||
sequence.SetFeatures(featBytes.Bytes())
|
||||
|
@ -7,6 +7,7 @@ package obiformats
|
||||
import "C"
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"os"
|
||||
"unsafe"
|
||||
@ -38,7 +39,7 @@ func _FastseqReader(seqfile C.fast_kseq_p,
|
||||
comment = ""
|
||||
}
|
||||
|
||||
rep := obiseq.NewBioSequence(name, sequence, comment)
|
||||
rep := obiseq.NewBioSequence(name, bytes.ToLower(sequence), comment)
|
||||
|
||||
if s.qual.l > C.ulong(0) {
|
||||
cquality := unsafe.Slice(s.qual.s, C.int(s.qual.l))
|
||||
|
@ -84,7 +84,7 @@ func _ParseGenbankFile(input <-chan _FileChunk, out obiiter.IBioSequenceBatch) {
|
||||
|
||||
case line == "//":
|
||||
sequence := obiseq.NewBioSequence(id,
|
||||
seqBytes.Bytes(),
|
||||
bytes.ToLower(seqBytes.Bytes()),
|
||||
defBytes.String())
|
||||
state = inHeader
|
||||
|
||||
|
Reference in New Issue
Block a user