A set of SPARQL examples that are used in different SIB resources
Select all Rhea reactions mapped to enzyme classification (EC numbers)
PREFIX ec: <http://purl.uniprot.org/enzyme/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rh: <http://rdf.rhea-db.org/>
# Query 9
# Select all Rhea reactions mapped to EC numbers (enzyme classification)
#
# This query corresponds to the Rhea website query:
# https://www.rhea-db.org/rhea?query=ec:*
#
SELECT ?ec ?ecNumber ?rhea ?accession ?equation
WHERE {
?rhea rdfs:subClassOf rh:Reaction .
?rhea rh:accession ?accession .
?rhea rh:ec ?ec .
BIND(strafter(str(?ec),str(ec:)) as ?ecNumber)
?rhea rh:isTransport ?isTransport .
?rhea rh:equation ?equation .
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?accession"):::projected
v3("?ec"):::projected
v4("?ecNumber"):::projected
v6("?equation"):::projected
v5("?isTransport")
v1("?rhea"):::projected
c2(["rh:Reaction"]):::iri
v1 --"rdfs:subClassOf"--> c2
v1 --"rh:accession"--> v2
v1 --"rh:ec"--> v3
bind0[/"substring-after(str(?ec),str('ec:'))"/]
v3 --o bind0
bind0 --as--o v4
v1 --"rh:isTransport"--> v5
v1 --"rh:equation"--> v6