@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_00060 a sh:SPARQLExecutable,
        sh:SPARQLSelectExecutable ;
    rdfs:comment "Proteins which have one or more negatively charged residue in a transmembrane domain"@en ;
    sh:prefixes _:sparql_examples_prefixes ;
    sh:select """PREFIX : <http://nextprot.org/rdf/>

SELECT DISTINCT ?entry WHERE {
 ?entry :isoform ?iso.
 ?iso :transmembraneRegion ?tm.
 ?tm :start ?tmstart ; :end ?tmend.
 ?iso :sequence /:chain ?chain.
 bind (substr(?chain, ?tmstart, ?tmend - ?tmstart + 1) as ?tmseq)
 filter (regex(?tmseq, '([DE]+.*[^DE]){1,}')) # Change the 1 for the number of acidic residues required (5 seems to be the max)
}""" ;
    schema:keywords "domain",
        "region",
        "sequence",
        "topology",
        "transmembrane",
        "tutorial" ;
    schema:target <https://sparql.nextprot.org/sparql> .

