Thanks a lot for the answer!
• 0 views
•
link
Hi all,
I have list of NCBI genome accessions (SAMN02441064, NC_014374, NZ_ACYB00000000 ...) and would like to know taxonomic IDs of the species that they belong to.
Is there a mapping file somewhere? Or how can I find their taxonomic IDs programmatically?
Thanks in advance, Marina
The directory ftp://ftp.ncbi.nlm.nih.gov/pub/taxonomy/accession2taxid/ provides mapping files between the accession.version (from a nucleotide, protein, WGS or TSA sequence record) and a taxonomy ID.
Thanks a lot for the answer!
If these are all nucleotide accessions then you can also use NCBI EntrezDirect:
$ esearch -db nuccore -query "SAMN02441064" | elink -target taxonomy | esummary | xtract -pattern DocumentSummary -element TaxId
1052825
$ esearch -db nuccore -query "NC_014374" | elink -target taxonomy | esummary | xtract -pattern DocumentSummary -element TaxId
666510
Thank you for the answer!
Log in to answer this question.