Question: converting taxID to taxonomy
0
gravatar for Freddy
5 weeks ago by
Freddy20
Freddy20 wrote:

Hello,

I know the following question have been asked many times by now, but the suggested solutions were not helpful. I have a set of taxIDs and I want to convert them to taxonomies, but I do not want to download any extra databases. Is there any simple way to do this via terminal?

terminal taxonomy taxid ncbi • 104 views
ADD COMMENTlink modified 5 weeks ago by genomax80k • written 5 weeks ago by Freddy20
2

Did you try taxonkit

ADD REPLYlink written 5 weeks ago by lakhujanivijay4.8k

, but the suggested solutions were not helpful

so, what did you try ?

ADD REPLYlink written 5 weeks ago by Pierre Lindenbaum127k
2
gravatar for genomax
5 weeks ago by
genomax80k
United States
genomax80k wrote:

Using Entrezdirect:

$ esearch -db taxonomy -query "4932 [taxID]" | efetch -format nativemode xml | xtract -pattern Taxon -block "*/Taxon" -unless Rank -equals "no rank" -tab "\n" -element Rank,ScientificName
superkingdom    Eukaryota
kingdom Fungi
subkingdom  Dikarya
phylum  Ascomycota
subphylum   Saccharomycotina
class   Saccharomycetes
order   Saccharomycetales
family  Saccharomycetaceae
genus   Saccharomyces

OR

$ esearch -db taxonomy -query "4932 [taxID]" | efetch -format native -mode xml | grep ScientificName | awk -F ">|<" 'BEGIN{ORS=", ";}{print $3;}'
Saccharomyces cerevisiae, cellular organisms, Eukaryota, Opisthokonta, Fungi, Dikarya, Ascomycota, saccharomyceta, Saccharomycotina, Saccharomycetes, Saccharomycetales, Saccharomycetaceae, Saccharomyces
ADD COMMENTlink written 5 weeks ago by genomax80k

@genomax Thank you very much, it works perfectly. There is a manual on how to use Entrez on NCBI, but I find it difficult to use. Do you have any suggestions for me on how to learn Entrez' commands properly?

ADD REPLYlink written 4 weeks ago by Freddy20
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1091 users visited in the last hour