@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_09412 a sh:SPARQLExecutable, sh:SPARQLSelectExecutable ;
  sh:prefixes _:sparql_examples_prefixes ;
  rdfs:comment '''Check there are no entries whose gene is not located either on chromosome 1-22, X, Y, MT, or unknown'''@en ;
  schema:keywords "QC", "chromosomal location" ;
  schema:target <https://sparql.nextprot.org/sparql> ;
  sh:select '''PREFIX : <http://nextprot.org/rdf/>
PREFIX cv: <http://nextprot.org/rdf/terminology/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

select distinct ?entry ?chr where {
  ?entry :gene  ?gene .
  ?gene :chromosome ?chr .
  filter (?chr not in ("1"^^xsd:string,
	"2"^^xsd:string,
	"3"^^xsd:string,
	"4"^^xsd:string,
	"5"^^xsd:string,
	"6"^^xsd:string,
	"7"^^xsd:string,
	"8"^^xsd:string,
	"9"^^xsd:string,
	"10"^^xsd:string,
	"11"^^xsd:string,
	"12"^^xsd:string,
	"13"^^xsd:string,
	"14"^^xsd:string,
	"15"^^xsd:string,
	"16"^^xsd:string,
	"17"^^xsd:string,
	"18"^^xsd:string,
	"19"^^xsd:string,
	"20"^^xsd:string,
	"21"^^xsd:string,
	"22"^^xsd:string,
	"X"^^xsd:string,
	"Y"^^xsd:string,
	"MT"^^xsd:string,
	"unknown"^^xsd:string))
}''' .
