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.
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?
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.
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.
As I said, you have to re-construct the tree; See Last Common Ancestor from NCBI Taxonomy using Java for a java example.
Log in to answer this question.