A set of SPARQL examples that are used in different TGX resources
Exports all pathways for a given species, returning identifiers, titles, and page URLs ordered by pathway ID. This example uses the default value (Species "Homo sapiens"); the WikiPathways SNORQL UI lets you change it.
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX wp: <http://vocabularies.wikipathways.org/wp#>
SELECT DISTINCT ?wpIdentifier ?pathway ?title ?page
WHERE {
?pathway dc:title ?title ;
foaf:page ?page ;
dc:identifier ?wpIdentifier ;
wp:organismName "Homo sapiens" .
}
ORDER BY ?wpIdentifier
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?page"):::projected
v2("?pathway"):::projected
v3("?title"):::projected
v1("?wpIdentifier"):::projected
c5(["Homo sapiens"]):::literal
v2 --"dc:title"--> v3
v2 --"foaf:page"--> v4
v2 --"dc:identifier"--> v1
v2 --"wp:organismName"--> c5