A set of SPARQL examples that are used in different TGX resources
Lists all metabolite data nodes in human pathways (NCBI Taxonomy 9606). Change the taxon, for example to 3702 for Arabidopsis thaliana, to get the metabolome of another species.
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX wp: <http://vocabularies.wikipathways.org/wp#>
PREFIX ncbi: <http://purl.obolibrary.org/obo/NCBITaxon_>
SELECT DISTINCT ?mb WHERE {
?mb a wp:Metabolite ;
dcterms:isPartOf ?pw .
?pw wp:organism ncbi:9606 .
} ORDER BY ?mb
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?mb"):::projected
v2("?pw")
c5([http://purl.obolibrary.org/obo/NCBITaxon_9606]):::iri
c2(["wp:Metabolite"]):::iri
v1 --"a"--> c2
v1 --"dcterms:isPartOf"--> v2
v2 --"wp:organism"--> c5