A set of SPARQL examples that are used in different SIB resources
Use IDSM Sachem to find ChEBIs with a a Cholestane skeleton (in SMILES). Then match returned ChEBIs to Rhea undirected reactions.
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rh: <http://rdf.rhea-db.org/>
PREFIX sachem: <http://bioinfo.uochb.cas.cz/rdf/v1.0/sachem#>
SELECT
?rhea
?chebi
WHERE {
SERVICE <https://idsm.elixir-czech.cz/sparql/endpoint/chebi> {
?chebi sachem:substructureSearch [
sachem:query "[C@]12(CCC3CCCC[C@]3(C)[C@@]1([H])CC[C@]1(C)[C@@]([H])([C@@](C)([H])CCCC(C)C)CC[C@@]21[H])[H]" ].
}
?rhea rh:side/rh:contains/rh:compound/rdfs:subClassOf ?chebi .
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?chebi"):::projected
v2("?rhea"):::projected
a1((" "))
a2((" "))
a3((" "))
a4((" "))
c3(["#91;C@#93;12(CCC3CCCC#91;C@#93;3(C)#91;C@@#93;1(#91;H#93;)CC#91;C@#93;1(C)#91;C@@#93;(#91;H#93;)(#91;C@@#93;(C)(#91;H#93;)CCCC(C)C)CC#91;C@@#93;21#91;H#93;)#91;H#93;"]):::literal
subgraph s1["https://idsm.elixir-czech.cz/sparql/endpoint/chebi"]
style s1 stroke-width:4px;
a1 --"sachem:query"--> c3
v1 --"sachem:substructureSearch"--> a1
end
v2 --"rh:side"--> a2
a2 --"rh:contains"--> a3
a3 --"rh:compound"--> a4
a4 --"rdfs:subClassOf"--> v1