sparql-examples

A set of SPARQL examples that are used in different SIB resources

View the Project on GitHub sib-swiss/sparql-examples

92_uniprot_bioregistry_iri_translation

Translate the global unique identifier for a UniProtKB record into other options using the bioregistry translating endpoint.

Use at

PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX uniprotkb: <http://purl.uniprot.org/uniprot/>
PREFIX up: <http://purl.uniprot.org/core/>

SELECT 
    ?protein 
    ?otherIdentifier
WHERE {
    BIND(uniprotkb:P00750 AS ?protein)
    ?protein a up:Protein .
    SERVICE <https://bioregistry.io/sparql> {
        ?protein owl:sameAs ?otherIdentifier .
    }
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v2("?otherIdentifier"):::projected 
  v1("?protein"):::projected 
  c2(["up:Protein"]):::iri 
  bind0[/"'uniprotkb:P00750'"/]
  bind0 --as--o v1
  v1 --"a"-->  c2
  subgraph s1["https://bioregistry.io/sparql"]
    style s1 stroke-width:4px;
    v1 --"owl:sameAs"-->  v2
  end