@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_09630 a sh:SPARQLExecutable, sh:SPARQLSelectExecutable ;
  sh:prefixes _:sparql_examples_prefixes ;
  rdfs:comment '''Check there are no entries in the Cancer variants portal that do not have a variant phenotype annotation'''@en ;
  schema:keywords "QC", "portal" ;
  schema:target <https://sparql.nextprot.org/sparql> ;
  sh:select '''PREFIX : <http://nextprot.org/rdf/>
PREFIX cv: <http://nextprot.org/rdf/terminology/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

select distinct ?entry where {
  values ?gene
  {"APC" "ASXL1" "ATR" "BARD1" "BCOR" "BLM" "BMPR1A" "BRCA1" "BRCA2" "BRIP1"
  "CDH1" "CDKN1B" "DNMT3A" "EPCAM" "EZH2" "FLT3" "GATA1" "IDH1" "IDH2" "KIT"
  "KRAS" "MEN1" "MLH1" "MLH3" "MSH2" "MSH6" "MUTYH" "NF1" "NF2" "PALB2"
  "PIK3CA" "PMS2" "PRKAR1A" "RAD51C" "RAD51D" "RB1" "RUNX1" "SDHAF2" "SDHC" "SDHD"
  "SMAD4" "SMARCB1" "XRCC2"} # space-separated
  ?entry :gene / :name / rdfs:label ?genename .
  bind (str(?genename) as ?gn) # here we convert "xxx"^^xsd:string to "xxx" to match the values
  filter(?gn = ?gene)
  filter not exists {?entry :isoform /:proteoform /:phenotypicVariation ?phenotype} # No phenotype annotation
}''' .
