samtools / htslib

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

bgzip: allow specification of output name. #1726

Closed ghuls closed 4 months ago

ghuls commented 5 months ago

It would be nice to be able to specify an output name when using bgzip> Especially when the input comes from stdin (e.g output from some preprocessing of an input file).

$ echo test | bgzip /dev/stdin
[bgzip] can't create /dev/stdin.gz: Permission denied

# Now this is required.
$ echo test | bgzip -c /dev/stdin > test.gz

# This would be useful to have.
$ echo test | bgzip -o test.gz /dev/stdin