sparql-examples

A set of SPARQL examples that are used in different SIB resources

View the Project on GitHub sib-swiss/sparql-examples

103_Select_all_approved_reactions_linked_to_a_given_EC_number

rq turtle/ttl

Select all approved reactions linked to a given EC number (EC 1.1.1.353)

Use at

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rh:<http://rdf.rhea-db.org/>
PREFIX ec:<http://purl.uniprot.org/enzyme/>

SELECT
  ?reaction
  ?reactionEquation
WHERE {
  BIND(ec:1.1.1.353 AS ?ecNumber)
  ?reaction rdfs:subClassOf rh:Reaction .
  ?reaction rh:status rh:Approved .
  ?reaction rh:equation ?reactionEquation .
  ?reaction rh:ec ?ecNumber
}
ORDER BY ?reaction
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v2("?ecNumber")
  v1("?reaction"):::projected 
  v3("?reactionEquation"):::projected 
  c4(["rh:Approved"]):::iri 
  c2(["rh:Reaction"]):::iri 
  bind0[/"'ec:1.1.1.353'"/]
  bind0 --as--o v2
  v1 --"rdfs:subClassOf"-->  c2
  v1 --"rh:status"-->  c4
  v1 --"rh:equation"-->  v3
  v1 --"rh:ec"-->  v2