@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_09447 a sh:SPARQLExecutable, sh:SPARQLSelectExecutable ;
  sh:prefixes _:sparql_examples_prefixes ;
  rdfs:comment '''Check there are no entries with a keyword in the category "Cellular component" that does not apply to human proteins'''@en ;
  schema:keywords "QC", "keyword" ;
  schema:target <https://sparql.nextprot.org/sparql> ;
  sh:select '''PREFIX : <http://nextprot.org/rdf/>
PREFIX cv: <http://nextprot.org/rdf/terminology/>

select distinct ?entry where {  # Include ?kw if result is not 0 to identify problem keyword
  values ?kw {
  cv:KW-0042 # Antenna complex
  cv:KW-0052 # Apoplast
  cv:KW-0134 # Cell wall
  cv:KW-0151 # Chlorosome
  cv:KW-0166 # Nematocyst
  cv:KW-0188 # Copulatory plug
  cv:KW-0193 # Cuticle
  cv:KW-0281 # Fimbrium
  cv:KW-0304 # Gas vesicle
  cv:KW-0327 # Glycosome
  cv:KW-0330 # Glyoxysome
  cv:KW-0377 # Hydrogenosome
  cv:KW-0419 # Kinetoplast
  cv:KW-0542 # Nucleomorph
  cv:KW-0574 # Periplasm
  cv:KW-0603 # Photosystem I
  cv:KW-0604 # Photosystem II
  cv:KW-0605 # Phycobilisome
  cv:KW-0674 # Reaction center
  cv:KW-0793 # Thylakoid
  cv:KW-0842 # Viral occlusion body
  cv:KW-0875 # Capsule
  cv:KW-0934 # Plastid
  cv:KW-0974 # Archaeal flagellum
  cv:KW-0975 # Bacterial flagellum
  cv:KW-1001 # Plastid inner membrane
  cv:KW-1002 # Plastid outer membrane
  cv:KW-1025 # Mitosome
  cv:KW-1031 # Host cell junction
  cv:KW-1034 # Host cell projection
  cv:KW-1035 # Host cytoplasm
  cv:KW-1036 # Host cytoplasmic vesicle
  cv:KW-1038 # Host endoplasmic reticulum
  cv:KW-1039 # Host endosome
  cv:KW-1040 # Host Golgi apparatus
  cv:KW-1041 # Host lipid droplet
  cv:KW-1042 # Host lysosome
  cv:KW-1043 # Host membrane
  cv:KW-1045 # Host mitochondrion
  cv:KW-1048 # Host nucleus
  cv:KW-1049 # Host periplasm
  cv:KW-1050 # Host thylakoid
  cv:KW-1266 # Target cell cytoplasm
  }
  ?entry :isoform /:keyword /:term ?kw.
}''' .
