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

ex:3 a sh:SPARQLExecutable,
        sh:SPARQLSelectExecutable ;
    rdfs:comment "Retrieve all proteins in OMA that is encoded by the INS gene and their mnemonics and evidence types from Uniprot database (federated query)."@en ;
    sh:prefixes _:sparql_examples_prefixes ;
    sh:select """PREFIX lscr: <http://purl.org/lscr#>
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 ?proteinOMA ?species ?mnemonic ?evidenceType ?UniProt_URI
WHERE {
    ?proteinOMA a orth:Protein ;
        orth:organism/obo:RO_0002162/up:scientificName ?species ;
        rdfs:label 'INS' .
    ?proteinOMA lscr:xrefUniprot ?UniProt_URI .
    # Search the INS gene mnemonics and evidence types from Uniprot database
    SERVICE <https://sparql.uniprot.org/sparql> {
        ?UniProt_URI up:mnemonic ?mnemonic ;
            up:existence/rdfs:label ?evidenceType.
    }
}""" ;
    schema:target <https://sparql.omabrowser.org/sparql> ;
    spex:federatesWith <https://sparql.uniprot.org/sparql> .

