Same bug but for fastq sequence writing only

Former-commit-id: 86d208fe66828da9943c559df80ff095b07eaf7a
This commit is contained in:
Eric Coissac
2024-06-26 18:46:47 +02:00
parent e40d0bfbe7
commit 154753de90
3 changed files with 7 additions and 2 deletions

View File

@@ -66,7 +66,9 @@ func FormatFastqBatch(batch obiiter.BioSequenceBatch,
_formatFastq(&bs, seq, formater)
if first {
bs.Grow(lt + (len(bs.Bytes())-seq.Len())*batch.Len()*5/4)
growing := lt + (len(bs.Bytes())-2*seq.Len())*batch.Len()*5/4
log.Debugf("Grow Fastq block of %d", growing)
bs.Grow(growing)
first = false
}