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] Slices are broken and how to fix it.

Vincent Emonet vincent.emonet at lirmm.fr
Wed Mar 23 08:17:24 PDT 2016


Hi,

First, thanks Paul for the history of why @context are done this way! 
Having 2 different usages for the same property in JSON can be a little 
confusing


I don't know if you have seen it but slices are broken

The problem comes from the way you retrieve the ontologies of a slice (I 
will use the cgiar slice as an example here, but it is the same problem 
for the others)
The CGIAR slice should return only one ontology (CO-WHEAT)

But http://data.bioontology.org/ontologies?ncbo_slice=cgiar is returning 
all ontologies


The problem comes from a previous inconstancy in your REST API URI 
pattern some problems
If we look at how are designed URIs for models:
http://data.bioontology.org/ontologies/STY 
<http://data.bioontology.org/ontologies/ICO/submissions>
http://data.bioontology.org/groups/CGIAR
<http://data.bioontology.org/groups/CGIAR>
"http://data.bioontology.org/categories/Imaging"

It is always keeping the Model name as plurial, but not for the slices :
It is http://data.bioontology.org/slices to retrieve all the slices
but http://data.bioontology.org/slice/cgiar"was the URI for one slice

I don't know what have been done but now it is taking 
http://data.bioontology.org/slices/cgiar 
<http://data.bioontology.org/slice/cgiar> as the good way to define the 
slice URI
So all the slices that are defined like this : 
http://data.bioontology.org/slice/cgiar"are not considered as slices 
anymore.


One workaround to be sure every slides are working properly would be to :

  * Delete all actual slice (using the bin/ncbo_cron --console) :
    LinkedData::Models::Slice.find("http://data.bioontology.org/slice/cgiar").first.delete

  * Use the HTTP methods I pull requested some months ago to properly
    create the slideshttps://github.com/ncbo/ontologies_api/pull/19
    <https://github.com/ncbo/ontologies_api/pull/19>

Here an example on how creating a new slices using cURL:
> curl -X POST -H "Content-Type: application/json" -H "Authorization: 
> apikey token=$APIKEY" -d '{ "acronym" : "cgiar", "name": "Consultative 
> Group on International Agricultural Research", "description" : "CGIAR 
> slice.", "ontologies" : ["CO-WHEAT"]}' http://data.bioontology.org/slices


Hope this helps and have a good day!

Vincent
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.stanford.edu/pipermail/bioontology-support/attachments/20160323/8d701337/attachment-0001.html>


More information about the bioontology-support mailing list