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] subclass query

manuelso manuelso at
Mon May 21 12:05:31 PDT 2012

Hi Helena,

Those "has_role" relationships that you are trying to find are hidden in the form of OWL restrictions. OWL restrictions serialize into complex RDF objects that use blank nodes and it is sometimes difficult to extract information from these.

The SPARQL query you need is ...

PREFIX rdfs: <>
SELECT ?sub ?label
?s <> <> .
?s <> <> .
?sub rdfs:subClassOf ?s .
?sub rdfs:label ?label .

that returns ..

<>	"crocetin"^^<>
<>	"coenzyme Q10"^^<>
<>	"zeaxanthin"^^<>
<>	"retinyl palmitate"^^<>

Unfortunately I do not think that SPARQL queries like the one above can be easily generalized and you might need to come up with some smart component that finds the pieces of information from how OWL serializes into RDF. If you want look further into this issue this reference might help:



On May 19, 2012, at 9:47 AM, Helena Deus wrote:

> Hi, 
> I am trying to replicate with a sparql query what I see through the bioportal interface. When I navigate to and click "visualize", there is a lot of concepts that connect to this one via a "hasRole" relationship. 
> But when I try to find these concepts using a reverse SPARQL query:
> PREFIX rdfs: <>
> FROM <>
> WHERE { 
> ?s ?p <> .
> }
>  The "hasRole" is nowehre to be seen... Any ideas on how I can capture the list of things with that role using the SPARQL endpoint?
> Thanks!
> -- 
> Helena F. Deus
> Post-Doctoral Researcher at DERI/NUIG
> _______________________________________________
> bioontology-support mailing list
> bioontology-support at

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

More information about the bioontology-support mailing list