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] get tree of a given class via REST interface

Lorenz buehmann buehmann at informatik.uni-leipzig.de
Fri Mar 11 03:56:02 PST 2016


Hello Jennifer,

thank you, that's quite helpful. I will try the inclusion of properties 
via REST parameters.

But can you clarify the meaning of

/ontologies/:ontology/classes/:cls/tree

For me it seems like it returns the root classes of the ontology, but 
then I'm wondering why :cls is sued as parameter.


Kind regards,
Lorenz

On 10.03.2016 22:38, Jennifer Leigh Vendetti wrote:
> Hello Lorenz,
>
>
>> On Mar 9, 2016, at 2:15 AM, Lorenz B. 
>> <buehmann at informatik.uni-leipzig.de 
>> <mailto:buehmann at informatik.uni-leipzig.de>> wrote:
>>
>> Hello,
>>
>> I'm wondering whether it's possible to get children of a given class 
>> via the REST interface.
>
>
> Yes, you can either get direct children, or all children.
>
>
> *Direct Children*
>
> Uses this format:
>
> /ontologies/:ontology/classes/:cls/children
>
> Using your class as an example:
>
> http://data.bioontology.org/ontologies/SNOMEDCT/classes/http%3A%2F%2Fpurl.bioontology.org%2Fontology%2FSNOMEDCT%2F260787004/children 
> <http://data.bioontology.org/ontologies/SNOMEDCT/classes/http://purl.bioontology.org/ontology/SNOMEDCT/260787004/children>
>
> *
> *
> *All Children*
>
> Uses this format:
>
> /ontologies/:ontology/classes/:cls/descendants
>
> Using your class as an example:
>
> http://data.bioontology.org/ontologies/SNOMEDCT/classes/http%3A%2F%2Fpurl.bioontology.org%2Fontology%2FSNOMEDCT%2F260787004/descendants 
> <http://data.bioontology.org/ontologies/SNOMEDCT/classes/http://purl.bioontology.org/ontology/SNOMEDCT/260787004/descendants>
>
>
>
>
>> I know that there is one request
>>
>> /ontologies/:ontology/classes/:cls/tree
>>
>> but it looks like it always returns the root classes only, and not 
>> the subclasses of the given class. see for example both links below:
>>
>> "http://data.bioontology.org/ontologies/SNOMEDCT/classes/http%3A%2F%2Fpurl.bioontology.org%2Fontology%2FSNOMEDCT%2F260787004/tree" 
>> <http://data.bioontology.org/ontologies/SNOMEDCT/classes/http%3A%2F%2Fpurl.bioontology.org%2Fontology%2FSNOMEDCT%2F260787004/tree>
>>
>> http://data.bioontology.org/ontologies/SNOMEDCT/classes/http%3A%2F%2Fpurl.bioontology.org%2Fontology%2FSNOMEDCT%2F404684003/tree
>>
>> For me this looks like a bug because otherwise there would be no need 
>> to have this for each class, but only for the ontology itself. 
>> Moreover, the
>> "children" property is always an empty array here.
>>
>> Indeed I could use as REST request
>>
>> /ontologies/:ontology/classes/:cls/children
>>
>> but this does not return information like "hasChildren" which is 
>> quite useful when building the class tree, like it's done in the 
>> public BioPortal UI.
>
>
>
> If you want to get information about whether a class has children, or 
> the child count, you can use the “include” parameter, e.g.:
>
> http://data.bioontology.org/ontologies/SNOMEDCT/classes/http%3A%2F%2Fpurl.bioontology.org%2Fontology%2FSNOMEDCT%2F260787004?include=hasChildren,childrenCount 
> <http://data.bioontology.org/ontologies/SNOMEDCT/classes/http://purl.bioontology.org/ontology/SNOMEDCT/260787004?include=hasChildren,childrenCount>
>
> Hope that helps.
>
> Best,
> Jennifer
>
>
>
>

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


More information about the bioontology-support mailing list