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] API Example Code in R

Scott Keating sjk3001 at
Fri Mar 10 14:01:01 PST 2017


This was extremely helpful, thank you for your support!


From: Jennifer Leigh Vendetti <vendetti at>
Sent: Friday, March 10, 2017 3:54:03 PM
To: Scott Keating
Cc: support at
Subject: Re: [bioontology-support] API Example Code in R

Hi again Scott,

Turns out there is someone in the dept. here that knows R, and sent this comment about your code:

"The problem is in his code. He creates an array of sentences initially, and then loops through this array and tries to annotate one sentence at a time. The problem is that when he invokes the postForm function,  he is passing the whole array (variable ‘text’) instead of one sentence (variable ‘curr_sentence’)."

result <- postForm(url,

Hope that helps.


On Mar 10, 2017, at 12:29 PM, Jennifer Leigh Vendetti <vendetti at<mailto:vendetti at>> wrote:

Hello Scott,

On Mar 10, 2017, at 10:39 AM, Scott Keating <sjk3001 at<mailto:sjk3001 at>> wrote:

I am trying to get the annotator to work using the R programming system. The API Documentation found here<> states that sample code can be found in other languages. Do you happen to have example code written in R that I might be able to use as a reference?

This is our GitHub repository that contains sample code in various languages:<>

We didn’t provide anything in R (I don’t know of anyone on our current development team that knows R).  There is however, a link in the file that points to an R project authored by Cristian R. Munteanu:<>

It looks like he’s interacting with the Recommender instead of the Annotator, but I imagine the code may be of use to you.  There is also an old page on our wiki with some example Annotator code written in R:<>

The caveat here being that the page is roughly 4 years old, and I can see that it’s using an older version of our REST API.  So, this one may not turn out to be that useful.

I am attempting to annotate patient electronic health record data for symptoms of adverse drug events using the diabetes ontology. When I run my code it states “Error: Bad Request”, which I assume has something to do with my API key, which I have verified as correct and properly linked to my account. Any pointers?

You mentioned that you think there’s a problem with your API key.  Just curious - did you try to execute a simple curl request outside of your program to verify that your API key is working, e.g.:


Kind regards,

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