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

ex:NXQ_00059 a sh:SPARQLExecutable,
        sh:SPARQLSelectExecutable ;
    rdfs:comment "Proteins that are glycosylated and phosphorylated on an extracellular topological domain"@en ;
    sh:prefixes _:sparql_examples_prefixes ;
    sh:select """PREFIX : <http://nextprot.org/rdf/>
PREFIX nextprot_cv: <http://nextprot.org/rdf/terminology/>

SELECT DISTINCT ?entry WHERE {
 ?entry :isoform ?iso.
 ?iso :topologicalDomain ?topodom.
 ?topodom :term nextprot_cv:CVTO_0002.
 ?topodom :start ?topostart ; :end ?topoend.
 ?iso :positionalAnnotation ?annot,?annot2.
 ?annot a :ModifiedResidue.
 ?annot :term ?ptmtype.
 filter (?ptmtype in (nextprot_cv:PTM-0253, nextprot_cv:PTM-0254, nextprot_cv:PTM-0255))
 ?annot2 a :GlycosylationSite.
 ?annot :start ?ptmpos.
 ?annot2 :start ?glypos.
 filter ((?ptmpos >= ?topostart) && (?ptmpos <= ?topoend))
 filter ((?glypos >= ?topostart) && (?glypos <= ?topoend))
}""" ;
    schema:keywords "PTM",
        "domain",
        "glycosylation",
        "phosphorylation",
        "region",
        "topology",
        "tutorial" ;
    schema:target <https://sparql.nextprot.org/sparql> .

