shenwei356 / taxonkit

A Practical and Efficient NCBI Taxonomy Toolkit, also supports creating NCBI-style taxdump files for custom taxonomies like GTDB/ICTV
https://bioinf.shenwei.me/taxonkit
MIT License
361 stars 29 forks source link

line-buffered output #11

Closed tolot27 closed 6 years ago

tolot27 commented 6 years ago

Currently, taxonkit uses xopen fully buffered output writers. Would it be possible to use at least a line-buffered writer? Grep does this by an additional parameter --line-buffered. The rationale behind this request is the piping of BLASTs tabular output. BLAST is line-buffered and I can process hits as they "appear" but not with taxonkit. Long-running BLAST jobs piped to taxonkit will produce the output only if a lot of hits "appear", regardless of the Linux tools unbuffer or stdbuf -oL.

shenwei356 commented 6 years ago

oh, it's easy, will do it tonight.

shenwei356 commented 6 years ago

try this: v0.2.5-dev with flag --line-buffered to disable output buffering.