bede / hostile

Precise host read removal
MIT License
74 stars 5 forks source link

When 0 reads remain after decontamination, an invalid gzip file is created #24

Closed bede closed 8 months ago

bede commented 1 year ago

Samtools considers an empty SAM/BAM file invalid, irritatingly. Workaround is to create empty but valid gzip file e.g.:

with gzip.open('empty.fastq.gz', 'wb') as f:
    pass
bede commented 8 months ago

Fixed in https://github.com/bede/hostile/commit/0b5ad56ed0d48b5d06a7ecc0a6d47b9db0ca41fc