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

[Question] Get all species-level taxon ids for organism #49

Closed jolespin closed 2 years ago

jolespin commented 2 years ago

Is there a way to get all the species level taxon identifiers for Bacteria or Archaea?

shenwei356 commented 2 years ago
# 2     bacteria
# 2157  archaea
# 4751  fungi
# 10239 virus

id=2
taxonkit list --ids $id --indent "" | taxonkit filter -E species > $id.species.taxid.txt

taxonkit lineage -n -r -L $id.species.taxid.txt | head -n 3
2707    Citrus greening disease-associated bacterium    species
29579   Heliothis virescens testis endosymbiont species
37449   gas vacuolate str. 90-P<gv>1    species
shenwei356 commented 2 years ago

@jolespin Did this help?

jolespin commented 2 years ago

Yes, this software and seqkit have been a life saver in my pipeline developments. Thanks again for creating such great software