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

Jennifer Leigh Vendetti vendetti at stanford.edu
Fri Mar 10 12:29:22 PST 2017


Hello Scott,


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

I am trying to get the annotator to work using the R programming system. The API Documentation found here<http://data.bioontology.org/documentation> 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:

https://github.com/ncbo/ncbo_rest_sample_code

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 README.md file that points to an R project authored by Cristian R. Munteanu:

https://github.com/muntisa/RNCBO

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:

https://www.bioontology.org/wiki/index.php/Annotator_R_Client

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.:

curl http://data.bioontology.org/ontologies/BRO?apikey=“your_api_key_here”

Kind regards,
Jennifer


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.stanford.edu/pipermail/bioontology-support/attachments/20170310/307aefae/attachment.html>


More information about the bioontology-support mailing list