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
357 stars 29 forks source link

[Feature] taxonkit list from taxon name #93

Open fgvieira opened 3 months ago

fgvieira commented 3 months ago

Prerequisites

Describe your issue

taxonkit allows to list all children nodes given a taxid, for example:

taxonkit list --ids 554915,33154 [...]

Would it be possible to do the same from the taxon name? For example:

taxonkit list --ids Amoebozoa,Opisthokonta [...]
shenwei356 commented 3 months ago

Good idea!

I can also make list to accept TaxIds from file and stdin. So you can also use

cat names.txt | taxonkit name2taxid | taxonkit list
fgvieira commented 3 months ago

And maybe even:

taxonkit list names.txt

Just to be consistent with the other tools.

shenwei356 commented 3 weeks ago

Sorry for the late implementation.

Accept input TaxIds from stdin/files, not just the flag --ids

# from stdin
echo 9606 | taxonkit list

# from file
taxonkit list <(echo 9606)

Binaries are here: https://github.com/shenwei356/taxonkit/issues/88#issuecomment-2169303015