How to get NCBI Accession Number from Taxonomy ID
1
0
Entering edit mode
5 months ago
Dan • 0

How to get NCBI Accession Number by Taxonomy ID ?

Accession NCBI Taxonomy ID Number • 370 views
ADD COMMENT
0
Entering edit mode

What do you mean NCBI accession number? That is usually the tax id. Could you provide an example, please ?

ADD REPLY
0
Entering edit mode

Using Entrezdirect (example taxID of E. coli):

$ esearch -db taxonomy -query "562 [taxID]" | elink -target nuccore | efetch -format acc | head -5
1QRU_B
1QRT_B
1QRS_B
NC_010064.1
2PXV_B

There are 64,700 as of today. So you will want to be specific as to what kind of accession you are looking for.

ADD REPLY
0
Entering edit mode
5 months ago
MirianT_NCBI ▴ 250

Hi Dan,

You can use NCBI Datasets. If you're looking for genome accessions, you can use the following command (I'm using human, 9606 as an example of taxid)

datasets summary genome taxon 9606 --assmaccs

datasets will return a list of accessions in JSON format. If you want more information than that, you can remove the assmaccs and you would have the complete JSON with info about each assembly. You can then parse the information using jq, for example.

Let me know if you have any questions or if you are looking for something else.

ADD COMMENT

Login before adding your answer.

Traffic: 1911 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6