A set of SPARQL examples that are used in different SIB resources
Select all hamap rules that annotate a Rhea reaction with an EC enzyme class
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX sp: <http://spinrdf.org/sp#>
PREFIX up: <http://purl.uniprot.org/core/>
SELECT ?rule ?enzymeClass
WHERE
{
?rule a sp:Construct ;
sp:templates/rdf:rest*/rdf:first ?annotationsToAdd .
?annotationsToAdd sp:predicate up:enzymeClass ;
sp:object ?enzymeClass .
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?annotationsToAdd")
v3("?enzymeClass"):::projected
v1("?rule"):::projected
a1((" "))
a2((" "))
c2(["sp:Construct"]):::iri
c7(["up:enzymeClass"]):::iri
v1 --"a"--> c2
v1 --"sp:templates"--> a1
a1 --"rdf:rest"--> a2
a2 --"rdf:first"--> v2
v2 --"sp:predicate"--> c7
v2 --"sp:object"--> v3