sparql-examples

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

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

006

rq turtle/ttl

Get the species currently in WikiPathways with their respective URIs.

Use at

PREFIX wp: <http://vocabularies.wikipathways.org/wp#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

SELECT DISTINCT ?organism (str(?label) as ?name)
WHERE {
    ?concept wp:organism ?organism ;
      wp:organismName ?label .
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v1("?concept")
  v3("?label"):::projected 
  v4("?name")
  v2("?organism"):::projected 
  v1 --"wp:organism"-->  v2
  v1 --"wp:organismName"-->  v3
  bind0[/"str(?label)"/]
  v3 --o bind0
  bind0 --as--o v4