sparql-examples

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

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

077

rq turtle/ttl

Lists the metabolites in Danio rerio (zebrafish) pathways, with the pathway title.

Use at

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

SELECT DISTINCT ?metabolite (str(?titleLit) as ?title) WHERE {
  ?metabolite a wp:Metabolite ;
    dcterms:isPartOf ?pw .
  ?pw dc:title ?titleLit ;
    wp:organismName "Danio rerio" .
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v1("?metabolite"):::projected 
  v2("?pw")
  v4("?title")
  v3("?titleLit"):::projected 
  c6(["Danio rerio"]):::literal 
  c2(["wp:Metabolite"]):::iri 
  v1 --"a"-->  c2
  v1 --"dcterms:isPartOf"-->  v2
  v2 --"dc:title"-->  v3
  v2 --"wp:organismName"-->  c6
  bind0[/"str(?titleLit)"/]
  v3 --o bind0
  bind0 --as--o v4