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
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.



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




I'm rather new to SPARQL (read the documentation and several tutorials)
and have begun trying simple queries of BioMedical ontologies (at 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 


For practice, I have executed the query "Get term direct sub-classes with
labels. SNOMED Example." at 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:  <>

PREFIX rdfs: <>


<> >


    ?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


Thanks very much for assistance

Daniel Lyman

lyman_daniel at


Daniel Lyman, Ph.D.


One Preserve Parkway

Rockville, MD 20852


Tel: 301-444-4006, x44006

Cell: 301-980-5361

email: lyman_daniel at




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

More information about the bioontology-support mailing list