A set of SPARQL examples that are used in different SIB resources
reaction to compound
PREFIX up: <http://purl.uniprot.org/core/>
PREFIX rh: <http://rdf.rhea-db.org/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT ?compound ?reaction
WHERE {
?reaction rdfs:subClassOf rh:Reaction.
?reaction rh:side ?side.
?side rh:contains ?participant.
?participant rh:compound ?compound.
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?compound"):::projected
v3("?participant")
v1("?reaction"):::projected
v2("?side")
c2(["rh:Reaction"]):::iri
v1 --"rdfs:subClassOf"--> c2
v1 --"rh:side"--> v2
v2 --"rh:contains"--> v3
v3 --"rh:compound"--> v4