sparql-examples

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

View the Project on GitHub sib-swiss/sparql-examples

3

For the KEGG compound C01732, retrieve the MNXref identifier, name and reference

Use at

PREFIX keggC: <https://identifiers.org/kegg.compound:>
PREFIX mnx: <https://rdf.metanetx.org/schema/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

# For the KEGG compound *C01732*, retrieve the MNXref
# identifier, name and reference.

SELECT ?metabolite ?reference ?name
FROM <https://rdf.metanetx.org/> WHERE {
    ?metabolite a mnx:CHEM .
    ?metabolite mnx:chemRefer ?reference .
    ?metabolite rdfs:comment ?name .
    ?metabolite mnx:chemXref keggC:C01732
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v1("?metabolite"):::projected 
  v3("?name"):::projected 
  v2("?reference"):::projected 
  c2(["mnx:CHEM"]):::iri 
  c6(["kegg.compound:C01732"]):::iri 
  v1 --"a"-->  c2
  v1 --"mnx:chemRefer"-->  v2
  v1 --"rdfs:comment"-->  v3
  v1 --"mnx:chemXref"-->  c6