Force sequence reading to produce lowercase sequences.

Adds two columns to the obiclean ratio csv file
This commit is contained in:
2022-11-22 15:06:09 +01:00
parent f4daa7f97f
commit 20b16c0ba1
14 changed files with 294 additions and 23 deletions

View File

@ -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

View File

@ -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())

View File

@ -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))

View File

@ -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