Closed Lix1993 closed 3 years ago
Yes, it's very easy.
Getting descendants' TaxIds of given microbes TaxIds:
$ taxonkit list --ids $(cut -f 1 microbe-taxids.tsv | paste -sd ,) \
--indent "" \
-o microbe-taxids.extended.tsv
$ wc -l microbe-taxids.extended.tsv
955966 microbe-taxids.extended.tsv
$ head -n 5 microbe-taxids.extended.tsv
2
1224
1236
33811
2707
Filtering query sequence by TaxId, with help of csvtk:
$ csvtk grep -t -f staxids -P microbe-taxids.extended.tsv gene2taxid.tsv
qseqid staxids
TRINITY_DN46_c0_g1 81932
TRINITY_DN46_c2_g1 2020875
thanks
I have a gene2taxid file, like this:
and a microbes taxid file, like this:
Can I get microbes genes using taxonkit?