A set of SPARQL examples that are used in different SIB resources
Select the specific form of RHEA:11628, a reaction that deals with general chemical classes (i.e. select the equivalent reactions involving instances of the chemical classes in RHEA:11628
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rh: <http://rdf.rhea-db.org/>
# Query 3
# Select the specific form of RHEA:11628.
# This query mimics the Related reactions sections of
# https://www.rhea-db.org/rhea/11628
#
SELECT ?rhea ?equation ?childrenRhea ?childrenEquation
WHERE {
VALUES (?rhea) {(rh:11628)}
?rhea rh:equation ?equation .
?childrenRhea rdfs:subClassOf+ ?rhea .
?childrenRhea rh:equation ?childrenEquation .
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?childrenEquation"):::projected
v3("?childrenRhea"):::projected
v2("?equation"):::projected
v1("?rhea"):::projected
bind0[/VALUES ?rhea/]
bind0-->v1
bind00(["rh:11628"])
bind00 --> bind0
v1 --"rh:equation"--> v2
v3 --"rdfs:subClassOf"--> v1
v3 --"rh:equation"--> v4