A set of SPARQL examples that are used in different TGX resources
Lists all KEGG Compound identifiers used for metabolite data nodes. Change the data source, for example to "HMDB", to list the identifiers from another database.
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX wp: <http://vocabularies.wikipathways.org/wp#>
SELECT DISTINCT ?identifier
WHERE {
?mb a wp:Metabolite ;
dc:source "KEGG Compound" ;
dc:identifier ?identifier .
} ORDER BY ?identifier
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?identifier"):::projected
v2("?mb")
c2(["wp:Metabolite"]):::iri
c4(["KEGG Compound"]):::literal
v2 --"a"--> c2
v2 --"dc:source"--> c4
v2 --"dc:identifier"--> v1