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] SPARQL Query

Alex Hardy alex-t-hardy at hotmail.com
Mon May 4 12:06:29 PDT 2015


Hi Manuel Thank you very much for the quick response and code example. I will try it in my tool and I hope that I do not need to bother you again. Thank you Alex
> Date: Mon, 4 May 2015 11:38:29 -0700
> From: manuelso at stanford.edu
> To: alex-t-hardy at hotmail.com
> CC: support at bioontology.org
> Subject: Re: [bioontology-support] SPARQL Query
> 
> Hi alex,
> 
> Not all classes and all ontologies have rdfs:label defined. BCGO does not any rdfs:label triples. We generate one using the predicate <http://bioportal.bioontology.org/metadata/def/prefLabel> . In this case the labels are just the last fragment of the class IRI.
> 
> This is the query that you need for that ontology:
> 
> PREFIX owl:  <http://www.w3.org/2002/07/owl#>
> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
>  
> SELECT DISTINCT ?s ?label WHERE {
>    GRAPH <http://bioportal.bioontology.org/ontologies/BCGO> {
>        ?s a owl:Class . ?s <http://bioportal.bioontology.org/metadata/def/prefLabel> ?label .
>    }
> }
> 
> 
> Manuel
> 
> ----- Original Message -----
> From: "Alex Hardy" <alex-t-hardy at hotmail.com>
> To: support at bioontology.org
> Sent: Monday, May 4, 2015 7:03:32 AM
> Subject: [bioontology-support] SPARQL Query
> 
> Hi 
> I have been using the example SPARQL query (shown below - 2 examples one ontology working, one not) for some coding on a university project across all the ontologies on the Bioportal. However, I have noticed that this SPARQL query code does not work for about 100 ontologies. I therefore looked at the characteristics of the ontologies where the query doesn’t function. It appears that it only functions for an ontology that has been updated since 2014. 
> I notice that many ontolgies that existed in the early days of the Bioportal have been updated after 2014 so these work with the SPARQL query code. Do you know: 
> - if there is there an ongoing programme to update the remaining old ontologies on the BioPortal? 
> - the reason why the SPARQL query code doesn’t work and if so, is there some sample code that would work with these ontologies. 
> Thank you for your help 
> Kind regards, 
> Alex 
> Example – that works 
> PREFIX owl: < http://www.w3.org/2002/07/owl# > 
> PREFIX rdfs: < http://www.w3.org/2000/01/rdf-schema# > 
> SELECT DISTINCT ?s ?label WHERE { 
> GRAPH < http://bioportal.bioontology.org/ontologies/ABA > { 
> ?s a owl:Class . 
> ?s rdfs:label ?label . 
> } 
> } 
> Example - that does not work 
> PREFIX owl: < http://www.w3.org/2002/07/owl# > 
> PREFIX rdfs: < http://www.w3.org/2000/01/rdf-schema# > 
> SELECT DISTINCT ?s ?label WHERE { 
> GRAPH < http://bioportal.bioontology.org/ontologies/ BCGO > { 
> ?s a owl:Class . 
> ?s rdfs:label ?label . 
> } 
> } 
> 
> _______________________________________________
> 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/20150504/da856d43/attachment.html>


More information about the bioontology-support mailing list