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

Lyman, Daniel [USA] Lyman_Daniel at bah.com
Wed Sep 25 08:45:02 PDT 2013


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 >
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<mailto: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<mailto: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/40ebe39d/attachment.html>


More information about the bioontology-support mailing list