@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:8 a sh:SPARQLExecutable,
        sh:SPARQLSelectExecutable ;
    rdfs:comment "Select all Rhea reactions mapped to GO molecular functions"@en ;
    sh:prefixes _:sparql_examples_prefixes ;
    sh:select """PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rh: <http://rdf.rhea-db.org/>

# Query 8
# Select all Rhea reactions mapped to GO molecular function
# 
# This query corresponds to the Rhea website query:
# https://www.rhea-db.org/rhea?query=go:*
#
SELECT ?go ?rhea ?equation 
WHERE {
  ?rhea rdfs:subClassOf rh:Reaction .
  ?rhea rdfs:seeAlso ?go .
  FILTER CONTAINS(str(?go), "GO_")   
  ?rhea rh:equation ?equation .
}""" ;
    schema:target <https://sparql.rhea-db.org/sparql/> .

