A set of SPARQL examples that are used in different TGX resources
Returns all compounds annotated with "ChEMBL compound" as data source, and the pathways they are in.
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 ?identifier ?pathway
WHERE {
?concept dcterms:isPartOf ?pathway . ?pathway a wp:Pathway .
?concept dc:source "ChEMBL compound" .
?concept dc:identifier ?identifier .
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?concept")
v3("?identifier"):::projected
v2("?pathway"):::projected
c3(["wp:Pathway"]):::iri
c5(["ChEMBL compound"]):::literal
v1 --"dcterms:isPartOf"--> v2
v2 --"a"--> c3
v1 --"dc:source"--> c5
v1 --"dc:identifier"--> v3