sparql-examples

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

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

98_Get_chebi_compound_of_a_given_InChI

rq turtle/ttl

Get chebi compound of a given InChI

Use at


PREFIX rh:<http://rdf.rhea-db.org/>
PREFIX obo:<http://purl.obolibrary.org/obo/>
PREFIX chebihash:<http://purl.obolibrary.org/obo/chebi/>
SELECT
  ?chebi
  ?inchi
WHERE {
  BIND("InChI=1S/C5H9NO4/c6-3(5(9)10)1-2-4(7)8/h3H,1-2,6H2,(H,7,8)(H,9,10)/t3-/m0/s1" AS ?inchi)
  ?chebi chebihash:inchi ?inchi .
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v2("?chebi"):::projected 
  v1("?inchi"):::projected 
  bind0[/"'InChI=1S/C5H9NO4/c6-3(5(9)10)1-2-4(7)8/h3H,1-2,6H2,(H,7,8)(H,9,10)/t3-/m0/s1'"/]
  bind0 --as--o v1
  v2 --"obo:chebi/inchi"-->  v1