TaxID to taxonomy (Entrez Direct: E-utilities on the Unix Command Line)
Entrez Direct: E-utilities on the Unix Command Line
I would like to execute the following command but with a list where i have thousands tax ids (id). How to execute that?
efetch -db taxonomy -id 9606,7227,10090 -format xml | xtract -pattern Taxon \ -element TaxId ScientificName GenbankCommonName Division
• 1,782 views
•
link
1 answer
One way
$ more ids
9606
7227
10090
$ for i in `cat ids`; do efetch -db taxonomy -id ${i} -format xml | xtract -pattern Taxon -element TaxId,ScientificName,GenbankCommonName,Division;done
9606 Homo sapiens human Primates
7227 Drosophila melanogaster fruit fly Invertebrates
10090 Mus musculus house mouse Rodents
• 0 views
•
link
Log in to answer this question.
you either download the complete taxonomy table locally and query that one (with eg grep ) or you put the the
efetchcommand in afor loopand loop over all your taxIDs.thanks, how to do that, any suggestion? is at like that?