@prefix ex: <https://sparql.uniprot.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#> .
@prefix spex:<https://purl.expasy.org/sparql-examples/ontology#> .

ex:109_uniprot_transporter_in_liver a sh:SPARQLExecutable,
        sh:SPARQLSelectExecutable ;
    rdfs:comment "Find human transporter proteins in reviewed UniProtKB/Swiss-Prot, that are expressed in the liver (Uses Bgee and UBERON)."^^rdf:HTML ;
    sh:prefixes _:sparql_examples_prefixes ;
    sh:select """PREFIX genex: <http://purl.org/genex#>
PREFIX lscr: <http://purl.org/lscr#>
PREFIX obo: <http://purl.obolibrary.org/obo/>
PREFIX orth: <http://purl.org/net/orth#>
PREFIX rh: <http://rdf.rhea-db.org/>
PREFIX taxon: <http://purl.uniprot.org/taxonomy/>
PREFIX uberon: <http://purl.obolibrary.org/obo/uo#>
PREFIX up: <http://purl.uniprot.org/core/>

SELECT
  ?rhea
  ?protein
  ?anat
WHERE
{
  GRAPH <https://sparql.rhea-db.org/rhea> {
    ?rhea rh:isTransport true .
  }
  ?protein up:annotation ?ann .
  ?protein up:organism taxon:9606 .
  ?ann up:catalyticActivity ?ca .
  ?ca up:catalyzedReaction ?rhea .
  BIND(uberon:0002107 AS ?anat)
  SERVICE <https://www.bgee.org/sparql/> {
    ?seq genex:isExpressedIn ?anat .
    ?seq lscr:xrefUniprot ?protein .
    ?seq orth:organism ?organism .
    ?organism obo:RO_0002162 taxon:9606 .
  }
}""" ;
    schema:keywords "federated query" , "Bgee" , "UBERON" , "tissue specificity" , "transport reaction" , "Rhea" ; 
    schema:target <https://sparql.uniprot.org/sparql/> ;
    spex:federatesWith <https://www.bgee.org/sparql/> .

