How to Map NCBI taxid to Open Tree of Life ott_id Without Using Scientific Names?
1
0
Entering edit mode
10 days ago

Hello everyone,

I am currently working on a project where I need to map a large list of organisms identified by their NCBI taxid to their corresponding ott_id in the Open Tree of Life taxonomy. Due to the extensive size of the list (thousands of taxid), I'm looking for an efficient method to do this without relying on scientific names, as they can introduce inaccuracies due to synonymy and naming inconsistencies. The final purpose is to obtain the corresponding synthetic tree from Open Tree of Life using the ott_id.

Is there an API or service that accepts taxid directly and returns ott_id? Has anyone handled a similar task with a large volume of taxonomic data, and could you share your approach or best practices? Any guidance, links, or examples would be greatly appreciated!

Thank you in advance for your help!

Martin

taxonomy ott • 368 views
ADD COMMENT
1
Entering edit mode
9 days ago
GenoMax 147k

You can use the API provided by Tree of Life (LINK):

$ curl -X POST https://api.opentreeoflife.org/v3/taxonomy/taxon_info -H 'content-type:application/json' -d '{"source_id":"ncbi:9443"}'
{
 "flags": [],
 "is_suppressed": false,
 "is_suppressed_from_synth": false,
 "name": "Primates",
 "ott_id": 913935,
 "rank": "no rank",
 "source": "ott3.7draft2",
 "synonyms": [
  "Ceciliolemuridae",
  "Primata",
  "primate"
 ],
 "tax_sources": [
  "ncbi:9443",
  "gbif:798",
  "irmng:11338"
 ],
 "unique_name": "Primates"

If you just need the ott_id you can parse the JSON using jq:

$ curl -X POST https://api.opentreeoflife.org/v3/taxonomy/taxon_info -H 'content-type:application/json' -d '{"source_id":"ncbi:9443"}' | jq -r ".ott_id"
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   350  100   325  100    25   1279     98 --:--:-- --:--:-- --:--:--  1377
913935
ADD COMMENT
0
Entering edit mode

Thank you! It worked

ADD REPLY

Login before adding your answer.

Traffic: 716 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