@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_00099 a sh:SPARQLExecutable,
        sh:SPARQLSelectExecutable ;
    rdfs:comment "Secreted proteins that have at least one PTM in a position of a variant"@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 {
 values ?sloc {nextprot_cv:GO_0005576 nextprot_cv:SL-0243} # GO and SL values for secreted
 ?entry :isoform ?iso .
 ?iso :swissprotDisplayed true . # restricted to main isoform due to computing time (> 98% of sites)
 ?iso :cellularComponent ?anno .
 ?anno :quality :GOLD; :term /:childOf ?sloc. # secreted
 filter not exists { ?anno :negativeEvidence ?_ }
 # excludes "extracellular exosome"-only location, most of them evidenced only by large-scale proteomic analysis
 filter not exists {
	 ?iso :cellularComponent /:term nextprot_cv:GO_0070062 . # extracellular exosome
 	 filter not exists { ?iso :cellularComponent /:term /:childOf nextprot_cv:SL-0243 .}
 	}
 ?iso :variant /:start ?varpos.
 ?iso :ptm /:start ?varpos.
}""" ;
    schema:keywords "PTM",
        "subcellular location",
        "tutorial",
        "variant" ;
    schema:target <https://sparql.nextprot.org/sparql> .

