Patch a bug in the fasta and fastq readers

Former-commit-id: 4998f157a90a6b077124d87d4a5cde0dd075d1ce
This commit is contained in:
2023-10-13 14:21:27 +02:00
parent 6acce603a1
commit 157c26cdc7
2 changed files with 28 additions and 8 deletions

View File

@@ -176,6 +176,7 @@ func ParseFastaChunk(source string, ch FastxChunk) *obiiter.BioSequenceBatch {
case 1:
if is_sep {
// No identifier -> ERROR
log.Errorf("%s : sequence entry does not have an identifier", source)
return nil
} else {
// Beginning of identifier
@@ -188,6 +189,11 @@ func ParseFastaChunk(source string, ch FastxChunk) *obiiter.BioSequenceBatch {
identifier = string(ch.Bytes[start:i])
state = 3
}
if is_end_of_line {
// Definition empty
definition = ""
state = 5
}
case 3:
if is_end_of_line {
// Definition empty