Search Mailing List Archives

Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[bioontology-support] Python API - Specifying ontology ID

Rayyan Aziz Ansari r.ansari at
Tue Mar 26 03:12:55 PDT 2019

Hi! With regard to my previous mail for the python api; This works:

annotations = get_json(REST_URL + "/annotator?max_level=3&text=" + urllib.parse.quote(text_to_annotate))

This line below does NOT (when i try to specify a particular ontology, for example: MEDDRA, I'm not sure if I'm putting the ontology id correctly, or even where to find it):

annotations = get_json(REST_URL + "/annotator?max_level=3&ontologies={MEDDRA}&text=" + urllib.parse.quote(text_to_annotate))

Please help, thanks,

From: John Graybeal <jgraybeal at>
Sent: Monday, March 25, 2019 10:27 PM
To: Rayyan Aziz Ansari
Cc: support at
Subject: Re: [bioontology-support] Python API - Specifying ontology ID

Just a quick tip (all I can manage this morning!): This 'line' is inserted as a segment of the original API query (generally this attributes are separated by &, as I recall. So whatever query you issued would have "&ontologies={...}" added to it.

If that doesn't unlock the problem for you, send the exact query you are using and someone will likely offer a more explicit answer.


On Mar 25, 2019, at 7:53 AM, Rayyan Aziz Ansari <r.ansari at<mailto:r.ansari at>> wrote:

P.S. Just as a follow up, I am trying to get a piece of text annotated, and am looking for particular (3 ontologies) ontologies only. I went through the API documentation where it describes ontology selection as follows:


But I do not know where to put the above line in the sample python code. Can someone please help?
From: Rayyan Aziz Ansari
Sent: Monday, March 25, 2019 4:02 PM
To: support at<mailto:support at>; bioontology-support at<mailto:bioontology-support at>
Subject: Python API - Specifying ontology ID

Hi, I am getting very long results when I do not specify the ontology ID (the sample python code does not specify the ID). I have tried to find a way to specify a particular ontology id in the sample python code available on the website. But I could not figure it out successfully.
Could someone please help me with this? I've spent a lot of time on this.

bioontology-support mailing list
bioontology-support at<mailto:bioontology-support at>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the bioontology-support mailing list