@prefix ex: <https://sparql.uniprot.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#> .
@prefix spex: <https://purl.expasy.org/sparql-examples/ontology#> .

ex:129_taxon_rhea_annotation_count a sh:SPARQLExecutable, sh:SPARQLSelectExecutable;
  rdfs:comment "List Taxa Identifiers and the number of annotated Rhea reactions in each that have experimental evidence."^^rdf:HTML;
  sh:prefixes _:sparql_examples_prefixes;
  sh:select """PREFIX taxon: <http://purl.uniprot.org/taxonomy/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX ECO: <http://purl.obolibrary.org/obo/ECO_>
PREFIX up: <http://purl.uniprot.org/core/>
SELECT 
	?taxon
	(COUNT(?rhea) AS ?experimentalRheaAnnotated)
WHERE {
  GRAPH <http://sparql.uniprot.org/uniprot> {
    ?protein up:organism ?taxon ;
             up:annotation ?catalyticActivityAnnotation .
	?catalyticActivityAnnotation up:catalyticActivity ?catalyticActivity .
    ?catalyticActivity up:catalyzedReaction ?rhea .
    [] rdf:subject ?catalyticActivityAnnotation ; 
       rdf:object ?catalyticActivity ; 
       up:attribution ?attr .
    ?attr up:evidence ECO:0000269 .
  }
} GROUP BY ?taxon""";
  schema:keywords "count", "enzyme", "taxon", "experimental";
  schema:target <https://sparql.uniprot.org/sparql> .
