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

ex:48 a sh:SPARQLExecutable,
        sh:SPARQLSelectExecutable ;
    rdfs:comment "Retrieve glycosylation sites and glycans on human enzymes (federated with Glyconnect)"@en ;
    sh:prefixes _:sparql_examples_prefixes ;
    sh:select """PREFIX faldo: <http://biohackathon.org/resource/faldo#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX glycan: <http://purl.jp/bio/12/glyco/glycan#>
PREFIX taxon: <http://purl.uniprot.org/taxonomy/>
PREFIX up: <http://purl.uniprot.org/core/>

SELECT
        DISTINCT
            ?protein ?glycosite ?glycostructure ?glycoimage
WHERE{
  ?protein up:annotation ?annotation .
  ?protein up:organism taxon:9606 .
  ?annotation a up:Catalytic_Activity_Annotation .
  ?protein up:sequence ?isoform .
   
  SERVICE <https://glyconnect.expasy.org/sparql> {
    ?glycosite faldo:reference ?isoform .
    ?glycosite faldo:position ?position .
    ?specificglycosite faldo:location ?glycosite .
    ?glycoprotein glycan:glycosylated_at ?specificglycosite .
    ?glycostructure glycan:glycosylates_at ?specificglycosite .
    ?glycostructure foaf:depiction ?glycoimage .
  }
}""" ;
    schema:keywords "enzyme" , "PTM" , "glycosylation" , "federated query" , "Glyconnect" ;
    schema:target <https://sparql.uniprot.org/sparql/> ;
    spex:federatesWith <https://glyconnect.expasy.org/sparql> .

