sparql-examples

A set of SPARQL examples that are used in different TGX resources

View the Project on GitHub BiGCAT-UM/sparql-examples

004

rq turtle/ttl

List all pathways in the AOP community portal and their title.

Use at

PREFIX wp: <http://vocabularies.wikipathways.org/wp#>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX cur: <http://vocabularies.wikipathways.org/wp#Curation:>

SELECT DISTINCT ?pathway (str(?title) as ?PathwayTitle)
WHERE {
  ?pathway wp:ontologyTag cur:AOP ; 
  a wp:Pathway ; 
  dc:title ?title .
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v3("?PathwayTitle")
  v1("?pathway"):::projected 
  v2("?title"):::projected 
  c2(["wp:Curation:AOP"]):::iri 
  c4(["wp:Pathway"]):::iri 
  v1 --"wp:ontologyTag"-->  c2
  v1 --"a"-->  c4
  v1 --"dc:title"-->  v2
  bind0[/"str(?title)"/]
  v2 --o bind0
  bind0 --as--o v3