@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_00004 a sh:SPARQLExecutable,
        sh:SPARQLSelectExecutable ;
    rdfs:comment "Proteins expressed in brain with observed IHC expression \"high\" but not expressed in testis"@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.
 # get all expression
 ?iso :expression ?e1.
 # highly expressed in brain
 ?e1 :term/:childOf nextprot_cv:TS-0095;:evidence/:observedExpression :High.
 # not expressed in testis
 ?iso :undetectedExpression ?e2.
 ?e2 :term nextprot_cv:TS-1030.
# Use the semicolon ';' to refer to the previous subject (?e1)
# Only IHC data has observed expression "High" so ECO is not specified.
#
# Note that we also exclude expression detected in testis.
 filter not exists { ?iso :detectedExpression / :term / :childOf nextprot_cv:TS-1030 }
}""" ;
    schema:keywords "expression",
        "tutorial" ;
    schema:target <https://sparql.nextprot.org/sparql> .

