@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#> .

ex:12 a sh:SPARQLExecutable,
        sh:SPARQLSelectExecutable ;
    rdfs:comment "Retrieve all orthologs between mouse and rabbit, together with their HOG id"@en ;
    sh:prefixes _:sparql_examples_prefixes ;
    sh:select """PREFIX obo: <http://purl.obolibrary.org/obo/>
PREFIX orth: <http://purl.org/net/orth#>
PREFIX up: <http://purl.uniprot.org/core/>

SELECT DISTINCT ?MOUSE_PROTEIN ?RABIT_PROTEIN ?HOG
WHERE {
    ?HOG a orth:OrthologsCluster ;
        orth:hasHomologousMember ?node1 ;
        orth:hasHomologousMember ?node2 .
    ?node2 orth:hasHomologousMember* ?RABIT_PROTEIN .
    ?node1 orth:hasHomologousMember* ?MOUSE_PROTEIN .
    ?MOUSE_PROTEIN a orth:Protein ;
        orth:organism/obo:RO_0002162/up:scientificName 'Mus musculus' .
    ?RABIT_PROTEIN a orth:Protein ;
        orth:organism/obo:RO_0002162/up:scientificName 'Oryctolagus cuniculus' .
    FILTER(?node1 != ?node2)
}""" ;
    schema:target <https://sparql.omabrowser.org/sparql> .

