@prefix ex: <https://sparql.orthodb.org/.well-known/sparql-examples/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix schema: <https://schema.org/> .
@prefix sh: <http://www.w3.org/ns/shacl#> .

ex:14 a sh:SPARQLExecutable,
        sh:SPARQLSelectExecutable ;
    rdfs:comment "Find genes with their properties by a list of their xrefs"@en ;
    sh:prefixes _:sparql_examples_prefixes ;
    sh:select """PREFIX up: <http://purl.uniprot.org/core/>
PREFIX ensembl: <http://rdf.ebi.ac.uk/resource/ensembl/>
PREFIX uniprotkb: <http://purl.uniprot.org/uniprot/>
PREFIX entrezgene: <http://www.ncbi.nlm.nih.gov/gene/>
PREFIX : <http://purl.orthodb.org/>

SELECT *
WHERE {
    ?gene a :Gene.
    ?gene :name ?gene_name; :description ?description; up:organism [up:scientificName ?org_name].
    ?gene :xref [a :Xref; :xrefResource ?xref]
    FILTER(?xref in (
    ensembl:ENSPTRG00000022217
    ,ensembl:ENSPVAG00000015405
    ,uniprotkb:Q9D4H7
    ,uniprotkb:H2PWL0
    ,entrezgene:105598395
    ,entrezgene:105062977
    ))
}""" ;
    schema:target <https://sparql.orthodb.org/sparql/> .

