@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_00295 a sh:SPARQLExecutable,
        sh:SPARQLSelectExecutable ;
    rdfs:comment "References for SCN1A variants causing Dravet syndrome"@en ;
    sh:prefixes _:sparql_examples_prefixes ;
    sh:select """PREFIX : <http://nextprot.org/rdf/>
PREFIX db: <http://nextprot.org/rdf/db/>
PREFIX nextprot: <http://nextprot.org/rdf/entry/>
PREFIX nextprot_cv: <http://nextprot.org/rdf/terminology/>

SELECT DISTINCT (str(?publiid) as ?PMID) ?title WHERE {
 nextprot:NX_P35498 :isoform ?iso. #SCN1A entry
 ?iso :swissprotDisplayed true. #Swissprot canonical isoform
 {
 ?iso :variant ?v.
 ?v :disease nextprot_cv:DI-01023. #UniProtKB term for Dravet syndrome
 ?v :evidence /:reference ?pub.
 ?pub :title ?title.
 ?pub :from ?xref .
 ?xref :accession ?publiid ; :provenance db:PubMed .
 }
 union
 {
 ?iso :proteoform ?pf.
 ?pf :diseaseRelatedVariant ?ann.
 filter not exists {?ann :negativeEvidence ?negev} # No negative disease evidence
 ?ann :impactedObject /:term nextprot_cv:C116573. #NCI Thesaurus term for Dravet syndrome
 ?ann :evidence /:reference ?pub.
 ?pub :title ?title.
 ?pub :from ?xref .
 ?xref :accession ?publiid ; :provenance db:PubMed .
 }
}""" ;
    schema:keywords "disease",
        "publication",
        "tutorial",
        "variant" ;
    schema:target <https://sparql.nextprot.org/sparql> .

