sparql-examples

A set of SPARQL examples that are used in different TGX resources

View the Project on GitHub BiGCAT-UM/sparql-examples

079

rq turtle/ttl

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.

Use at

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