This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Gi Number To Taxid To Phylum Name

I have a bunch of fasta files from NCBI, and I know to use gi_taxid_nucl.dmp to change gi into taxid numbers. But how to turn the taxid I got into their corresponding phyla names?

ncbi

1 answer

you can use the NBCI E-Utilities:

$ xmllint --xpath '/TaxaSet/Taxon/LineageEx/Taxon[Rank="phylum"]/ScientificName/text()'  "http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=taxonomy&id=9606" 
Chordata

or join the data to the dump for the taxonomy database, but you' ll have to re-create the NCBI tree from those data.

ftp://ftp.ncbi.nih.gov/pub/taxonomy/taxdump.tar.Z

I have downloaded the taxdump but after I unzip it, there are several files. I think the most useful ones would be names.dmp and nodes.dmp. But none of both have a one to one relationship of taxid and its related phylum.

oh, that was the phylum. I've updated my answer .

Sorry, but I mean the second method you said "join the data to the dump for the taxonomy database". I have downloaded the file and unzipped it. But none of those files have direct relationships between taxid and phylum names.

Log in to answer this question.