A set of SPARQL examples that are used in different SIB resources
Get chebi compound of a given InChI
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