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] transitive inference in sparql queries

Darren Weber dlweber at stanford.edu
Mon Apr 7 17:13:50 PDT 2014


Hi olivier,

Just leave off the '*', i.e.

     ?source rdfs:subClassOf ?anc .

This works in the SPARQL browser at
http://sparql.bioontology.org/

It returns:

anc 	label
<http://purl.obolibrary.org/obo/DOID_5672 
<http://sparql.bioontology.org/?describe=http%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FDOID_5672&csrfmiddlewaretoken=a9d8f3ab490adf33fbef58b0b59633eb>> 
[http] <http://purl.obolibrary.org/obo/DOID_5672> 	"large intestine cancer"
<http://purl.obolibrary.org/obo/DOID_219 
<http://sparql.bioontology.org/?describe=http%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FDOID_219&csrfmiddlewaretoken=a9d8f3ab490adf33fbef58b0b59633eb>> 
[http] <http://purl.obolibrary.org/obo/DOID_219> 	"colon cancer"



Hope that helps,
Darren



On 4/7/14, 3:15 PM, Olivier Dameron wrote:
> Hello,
>     I have a need for transitive inference in sparql queries (e.g.
> retrieving all the superclasses of a class). The classic path-based
> approach (rdfs:subClassOf*) does not seem to work:
>
> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
> PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
> PREFIX obol: <http://www.geneontology.org/formats/oboInOWL#>
> PREFIX do: <http://purl.bioontology.org/ontology/DOID>
> PREFIX omim: <http://purl.obolibrary.org/obo/OMIM_>
>
> SELECT ?anc ?label
> FROM <http://bioportal.bioontology.org/ontologies/DOID>
> WHERE
> {
>      ?source obol:xref	omim:114500 .
>      ?source rdfs:subClassOf* ?anc .
>      ?anc rdfs:label ?label
> }
>
> However, a previous email by Ray suggests that this is possible:
> http://lists.w3.org/Archives/Public/public-semweb-lifesci/2012Nov/0003.html
>
> Am I missing something?
> thank you
> olivier
> _______________________________________________
> bioontology-support mailing list
> bioontology-support at lists.stanford.edu
> https://mailman.stanford.edu/mailman/listinfo/bioontology-support

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.stanford.edu/pipermail/bioontology-support/attachments/20140407/2c10d1ca/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: link.png
Type: image/png
Size: 165 bytes
Desc: not available
URL: <http://mailman.stanford.edu/pipermail/bioontology-support/attachments/20140407/2c10d1ca/attachment.png>


More information about the bioontology-support mailing list