samtools / htslib

C library for high-throughput sequencing data formats
Other
789 stars 447 forks source link

Can we pass an input file descriptor to bgzf_mt ? #1553

Closed rpadmanabhan closed 1 year ago

rpadmanabhan commented 1 year ago

Hi, We can pass an input file descriptor to bgzf_mt right ? The function doc says "the file must be open for writing" [https://github.com/samtools/htslib/blob/develop/htslib/bgzf.h#L333]. But it looks like there were updates in the past that enable multi-threading when reading bgzf files as well ? It works for me when I pass an input file descriptor. Just wanted to confirm.

Also, thanks for all the great work in making such a high quality library available to the bioinformatics community.

daviesrob commented 1 year ago

Yes. The comment "must be open for writing" pre-dates the current threading code. We should remove it.