@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_00008 a sh:SPARQLExecutable,
        sh:SPARQLSelectExecutable ;
    rdfs:comment "Proteins whose genes are less than 50000 bp away from the location of the gene coding for protein p53"@en ;
    sh:prefixes _:sparql_examples_prefixes ;
    sh:select """PREFIX : <http://nextprot.org/rdf/>
PREFIX nextprot: <http://nextprot.org/rdf/entry/>

SELECT DISTINCT ?entry WHERE {
 nextprot:NX_P04637 :gene /:begin ?s;:gene/:chromosome ?chr.
 ?entry :gene/:begin ?gs;:gene/:chromosome ?chr.
 filter ( ?gs > (?s -50000) && ?gs <= (?s +50000) && ?entry != nextprot:NX_P04637 )
}""" ;
    schema:keywords "chromosomal location",
        "tutorial" ;
    schema:target <https://sparql.nextprot.org/sparql> .

