@prefix ex: <https://sparql.uniprot.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:35 a sh:SPARQLExecutable,
        sh:SPARQLSelectExecutable ;
    rdfs:comment "Find the similar proteins for UniProtKB entry P05067 sorted by UniRef cluster identity"@en ;
    sh:prefixes _:sparql_examples_prefixes ;
    sh:select """PREFIX uniprotkb: <http://purl.uniprot.org/uniprot/>
PREFIX up: <http://purl.uniprot.org/core/>

SELECT 
    ?similar ?identity
FROM <http://sparql.uniprot.org/uniref>
FROM <http://sparql.uniprot.org/uniprot>
WHERE
{
    BIND (uniprotkb:P05607 AS ?protein)
    ?cluster up:member ?member ;
             up:member/up:sequenceFor ?protein;
             up:identity ?identity .
    ?member up:sequenceFor ?similar .
    FILTER(!sameTerm(?similar, ?protein))
} 
ORDER BY DESC(?identity)""" ;
    schema:keywords "similarity" , "UniRef" ;
    schema:target <https://sparql.uniprot.org/sparql/> .

