Sparql query with RO links

prefix go: <http://purl.org/obo/owl/GO#>
prefix dc: <http://purl.org/dc/elements/1.1/>
prefix owl: <http://www.w3.org/2002/07/owl#>
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix foaf: <http://xmlns.com/foaf/0.1/>
prefix sc: <http://sw.neurocommons.org/2007/annotations#>
prefix aba: <http://sw.neurocommons.org/2007/aba/>
prefix xsd: <http://www.w3.org/2001/XMLSchema#>
prefix ro: <http://www.obofoundry.org/ro/ro.owl#>

construct { ?e rdf:type sc:entrez-gene-record. ?e aba:hasName ?name. ?
e foaf:image ?url.
                   ?e sc:has-id ?entrez. ?e ro:located_in ?location. ?
e sc:has_location_name ?locationName   }
from <http://sw.neurocommons.org/aba-20070226>
where
{ ?b rdf:type aba:MouseBrainGeneExpressionSurvey.
   ?b aba:measuresGeneIdentifiedWith ?g.
   ?g aba:refersToSameGeneAs ?e.
   optional {?g aba:hasName ?name}.
   ?e rdf:type sc:entrez-gene-record.
   ?e sc:has-id ?entrez.
   ?b aba:hasSectionSeries ?ss.
   ?ss aba:hasSection ?bs.
   ?bs aba:atPosition "2000"^^xsd:int.
   ?bs aba:hasSectionOrientation aba:SagittalOrientation.
   ?bs aba:hasImagePyramids ?ps.
   ?ps aba:hasImagePyramid ?p.
   ?p rdf:type aba:ExpressionImagePyramid.
   ?p aba:hasURLTemplate ?url.

   graph <http://purl.org/commons/hcls/goa>
     { ?protein rdfs:subClassOf ?res.
       ?res owl:onProperty ro:located_in.
       ?res owl:someValuesFrom ?location.
       graph <http://purl.org/commons/hcls/20070416/classrelations>
         { ?location rdfs:subClassOf go:GO_0005575 }
       ?protein rdfs:subClassOf ?parent.
       ?parent owl:equivalentClass ?res3.
       ?res3 owl:hasValue ?gene.
      }
   graph <http://purl.org/commons/hcls/gene>
    { ?gene dc:identifier ?entrez }
   graph <http://purl.org/commons/hcls/20070416>
    { ?location rdfs:label ?locationName }

}

Received on Friday, 25 May 2007 12:55:28 UTC