@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_00016 a sh:SPARQLExecutable,
        sh:SPARQLSelectExecutable ;
    rdfs:comment "Proteins with a mature chain of less than 1000 amino acids which are secreted and do not contain cysteines in the mature chain"@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 :cellularComponent ?anno .
 ?anno :term /:childOf ?sloc .
 filter not exists { ?anno :negativeEvidence ?_ }
 #
 # filter not exists {?iso :cellularComponent /:term nextprot_cv:GO_0070062 .
 # filter not exists {?iso :cellularComponent /:term /:childOf nextprot_cv:SL-0243 .}
 # }
 # you can uncomment this to filters out extracellular exosome only location (2240 entries),
 # most of them evidenced only by large-scale proteomic analysis
 #
 ?iso :sequence / :chain ?seq.
 ?iso :matureProtein [ :start ?mstart ; :end ?mend]
 filter ((?mend-?mstart > 0) && (?mend-?mstart < 1000))
 bind (?mend - ?mstart + 1 as ?mlen)
 bind (substr(?seq, ?mstart, ?mlen) as ?mseq)
 filter (!regex (?mseq,'C'))
}""" ;
    schema:keywords "processing",
        "sequence",
        "subcellular location",
        "tutorial" ;
    schema:target <https://sparql.nextprot.org/sparql> .

