@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix ex: <https://sparql.rhea-db.org/.well-known/sparql-examples/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix schema: <https://schema.org/> .
@prefix sh: <http://www.w3.org/ns/shacl#> .

ex:110_Select_reaction_ec_protein_for_a_given_reaction a sh:SPARQLExecutable, sh:SPARQLSelectExecutable;
  rdfs:comment "Select <reaction> <ec> <protein> for a given reaction"@en;
  sh:select """PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rh:<http://rdf.rhea-db.org/>
PREFIX ec:<http://purl.uniprot.org/enzyme/>
PREFIX up:<http://purl.uniprot.org/core/>

SELECT
  ?reaction
  ?enzyme
  ?protein
WHERE {
  BIND(rh:11672 AS ?reaction)
  ?reaction rdfs:subClassOf rh:Reaction .
  ?reaction rh:ec ?enzyme
  SERVICE <http://sparql.uniprot.org/sparql> {
    ?protein up:reviewed true .
    OPTIONAL {?protein up:enzyme ?enzyme. } .
    OPTIONAL {?protein up:domain/up:enzyme ?enzyme . } .
    OPTIONAL {?protein up:component/up:enzyme ?enzyme .} .
  }
}""";
  <https://purl.expasy.org/sparql-examples/ontology#federatesWith> <http://sparql.uniprot.org/sparql>;
  schema:target <https://sparql.rhea-db.org/sparql> .
