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

ex:004 a sh:SPARQLExecutable,
        sh:SPARQLSelectExecutable ;
    rdfs:comment "What are the anatomical entities where the APOC1 Homo sapiens gene is expressed?"@en ;
    sh:prefixes _:sparql_examples_prefixes ;
    sh:select """PREFIX genex: <http://purl.org/genex#>
PREFIX obo: <http://purl.obolibrary.org/obo/>
PREFIX orth: <http://purl.org/net/orth#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX up: <http://purl.uniprot.org/core/>

SELECT DISTINCT ?geneName ?anat ?anatName WHERE {
    ?seq a orth:Gene ;
        genex:isExpressedIn ?anat ;
        rdfs:label ?geneName .
    ?anat a genex:AnatomicalEntity ;
        rdfs:label ?anatName .
    ?seq orth:organism ?organism .
    ?organism obo:RO_0002162  ?species .
    ?species a up:Taxon ;
        up:scientificName "Homo sapiens" .
    FILTER (LCASE(?geneName) = LCASE('APOC1') )
}""" ;
    schema:target <https://www.bgee.org/sparql/> .
