@prefix ex: <https://sparql.uniprot.org/.well-known/sparql-examples/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix schema: <https://schema.org/> .
@prefix sh: <http://www.w3.org/ns/shacl#> .

ex:enzyme_with_threonine_as_active_site a sh:SPARQLExecutable,
        sh:SPARQLSelectExecutable ;
    rdfs:comment "Find enzymes with a Tyrosine (Y) as an active site"@en ;
    sh:prefixes _:sparql_examples_prefixes ;
    sh:select """PREFIX faldo: <http://biohackathon.org/resource/faldo#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX up: <http://purl.uniprot.org/core/>

SELECT
  ?protein
WHERE {
  ?protein up:annotation ?activeSiteAnnotation .
  ?activeSiteAnnotation a up:Active_Site_Annotation ;
    up:range ?range .
  ?range faldo:begin ?begin .
  ?begin faldo:position ?beginPosition ;
    faldo:reference ?sequence .
  ?sequence rdf:value ?sequenceVal .
  FILTER(SUBSTR(?sequenceVal, ?beginPosition, 1) = 'Y')
}""" ;
    schema:keywords "active site", "enzyme" , "search within sequence" ;
    schema:target <https://sparql.uniprot.org/sparql/> ;
    schema:subjectOf <https://education.expasy.org/cours/SIB_UniProtKB_Enzymes_2024/> .

