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

There are so many ranks #1

Closed shenwei356 closed 5 years ago

shenwei356 commented 7 years ago

OMG, so many ranks:

class
family
forma
genus
infraclass
infraorder
kingdom
no rank
order
parvorder
phylum
species
species group
species subgroup
subclass
subfamily
subgenus
subkingdom
suborder
subphylum
subspecies
subtribe
superclass
superfamily
superkingdom
superorder
superphylum
tribe
varietas
childers commented 7 years ago

Are you planning to support filtering to output a subset of ranks?

shenwei356 commented 7 years ago

"taxonkit list" can do this when you provide the taxid of the ranks

lskatz commented 5 years ago

I used grep and was happy that this toolkit works very well with piping. For example showing all subspecies of Vibrio in my custom Kraken database:

taxonkit --data-dir Kalamari_v3.4/taxonomy list --ids 662 --show-name --show-rank | grep -v 'no rank' | grep -v 'Vibrio sp'

I'd imagine that you could have an "or" in grep, something like

taxonkit --data-dir Kalamari_v3.4/taxonomy list --ids 662 --show-name --show-rank | grep -v 'tribe\|varietas'
shenwei356 commented 5 years ago

@lskatz, grep -v -E 'tribe|varietas'?

lskatz commented 5 years ago

Yes that works, @shenwei356 !