This is a test version of Biostars. For the public version, visit https://www.biostars.org.
To retrieve bacterial Phylum and Class information from a set of tax id

Hi ,

I wanted to get the phylum and class information of set of species , its about 1000 . I have each tax id . Is there any possibility to get the phylum and class information by uploading the tax id file in a batch search?

rna-seq snp next-gen sequence gene

3 answers

You could use NCBI eutilities with esarch and efetch. From the xml output you can extract the full lineage:

esearch -db taxonomy -query "txid11053 [Organism]" | efetch -format xml | xtract -element Lineage

Try searching with the -pattern parameter.

esearch -db taxonomy -query "txid11053 [Organism]" | efetch -format xml | xtract  -pattern Lineage -element Lineage

download the NCBI taxdump file from ftp://ftp.ncbi.nih.gov/pub/taxonomy/taxdmp.zip , unzip the content , sort, and join the files & get the result.

see ftp://ftp.ncbi.nih.gov/pub/taxonomy/taxdump_readme.txt for a description of the content of the zip file

It contains several files with .dmp extension. Can i join all these

You can also query this URL with a comma-delimited list of numbers. For example:

http://taxonomy.jgi-psf.org/tax/id/9606,1234

Log in to answer this question.