A set of SPARQL examples that are used in different TGX resources
Finds all interactions (wp:Interaction) connected to a particular data node, here the Ensembl gene ENSG00000125845.
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX wp: <http://vocabularies.wikipathways.org/wp#>
SELECT DISTINCT ?interaction ?pathway WHERE {
?pathway a wp:Pathway .
?interaction dcterms:isPartOf ?pathway .
?interaction a wp:Interaction .
?interaction wp:participants <https://identifiers.org/ensembl/ENSG00000125845> .
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?interaction"):::projected
v1("?pathway"):::projected
c4(["wp:Interaction"]):::iri
c6([https://identifiers.org/ensembl/ENSG00000125845]):::iri
c2(["wp:Pathway"]):::iri
v1 --"a"--> c2
v2 --"dcterms:isPartOf"--> v1
v2 --"a"--> c4
v2 --"wp:participants"--> c6