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 assistance request

Ray Fergerson ray.fergerson at stanford.edu
Wed Sep 25 18:34:09 PDT 2013


Can you post the exact query that you issued that doesn't work. In your
example below I think that you want "ABC" rather than "?ABC". Also you
must use the URI for the term rather than any shorter (readable) term in
the query. This was the point of the definition of "snomed-term"
definition in the example - to make it more readable.

Ray

 

From: bioontology-support-bounces at lists.stanford.edu
[mailto:bioontology-support-bounces at lists.stanford.edu] On Behalf Of
Lyman, Daniel [USA]
Sent: Wednesday, September 25, 2013 8:45 AM
To: support at bioontology.org
Cc: Lyman, Daniel [USA]
Subject: [bioontology-support] SPARQL query assistance request

 

Hello,

 

I'm rather new to SPARQL (read the documentation and several tutorials)
and have begun trying simple queries of BioMedical ontologies (at
http://bioportal.bioontology.org/ontologies) with the BioPortal SPARQL
service. I'm not a software engineer (biologist/ontologist) and need to
run successful SPARQL queries, but am having great difficulties.

 

I'm fairly certain the problems result from syntactic errors in my queries
due to inexperience and wonder if you could recommend some solutions.
Specifically, I wish to query with the service all direct subclasses (with
labels) of any specified class (ABC) in some selected ontology of interest
(XYZ) at http://bioportal.bioontology.org/ontologies. 

 

For practice, I have executed the query "Get term direct sub-classes with
labels. SNOMED Example." at http://sparql.bioontology.org/examples. And of
course the query worked very well. 

 

But, the basic formula of the SNOMED example query does not seem to work
(with appropriate substitutions for snomed-term, SNOMEDCT, etc.) for other
(OBO and OWL) ontologies at BioPortal and I suspect that some formula like
the following may instead be necessary: 

 

PREFIX owl:  <http://www.w3.org/2002/07/owl#>

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

SELECT DISTINCT ?x ?label 

FROM <http://bioportal.bioontology.org/ontologies/XYZ
<http://bioportal.bioontology.org/ontologies/XYZ%20> >

WHERE {

    ?x rdfs:subClassOf  ?ABC.

    ?x rdfs:label ?label .

}

 

But this query returns no results, even though class ABC in ontology XYZ
has subclasses. Similarly, numerous variations on this query formula fail;
retrieving for example, no results or all classes.

 

Could you recommend a formula to query with the service all direct
subclasses (with labels) of any specified class (ABC) in some selected
ontology of interest (XYZ) at http://bioportal.bioontology.org/ontologies?

 

Thanks very much for assistance

Daniel Lyman

lyman_daniel at bah.com

 

Daniel Lyman, Ph.D.

Booz|Allen|Hamilton

One Preserve Parkway

Rockville, MD 20852

 

Tel: 301-444-4006, x44006

Cell: 301-980-5361

email: lyman_daniel at bah.com 

www.boozallen.com

 

 

 

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


More information about the bioontology-support mailing list