@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_00002 a sh:SPARQLExecutable,
        sh:SPARQLSelectExecutable ;
    rdfs:comment "Proteins that are located in both the nucleus and in the cytoplasm"@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 ?cytoloc {nextprot_cv:GO_0005737 nextprot_cv:SL-0086} # GO and SL values for cytoplasm
 values ?nucloc {nextprot_cv:GO_0005634 nextprot_cv:SL-0191} # GO and SL values for nucleus
 ?entry :isoform ?iso.
 ?iso :cellularComponent ?loc1, ?loc2 .
 ?loc1 :term /:childOf ?cytoloc .
 ?loc2 :term /:childOf ?nucloc .
 filter not exists {?loc1 :negativeEvidence ?negev} # No negative localization evidence
 filter not exists {?loc2 :negativeEvidence ?negev} # No negative localization evidence
}

# Note the dot "." at the end of statements.
# If missing, you will get a syntax error.
#
# Use a comma to retrieve two localizations in:
# ?iso :cellularComponent ?loc1, ?loc2 .""" ;
    schema:keywords "subcellular location",
        "tutorial" ;
    schema:target <https://sparql.nextprot.org/sparql> .

