A set of SPARQL examples that are used in different SIB resources
Map a selection of UniProtKB accession numbers (ACs) to HGNC identifiers and symbols
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX uniprotkb: <http://purl.uniprot.org/uniprot/>
PREFIX up: <http://purl.uniprot.org/core/>
SELECT
?uniprot
?hgnc
?hgncSymbol
WHERE
{
# A space separated list of UniProt primary accessions.
VALUES (?acc) {('P05067') ('P00750')}
BIND(iri(concat(str(uniprotkb:), ?acc)) AS ?uniprot)
?uniprot rdfs:seeAlso ?hgnc .
?hgnc up:database <http://purl.uniprot.org/database/HGNC> ;
rdfs:comment ?hgncSymbol .
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?acc")
v3("?hgnc"):::projected
v4("?hgncSymbol"):::projected
v2("?uniprot"):::projected
c3([http://purl.uniprot.org/database/HGNC]):::iri
bind0[/VALUES ?acc/]
bind0-->v1
bind00(["P05067"])
bind00 --> bind0
bind01(["P00750"])
bind01 --> bind0
bind1[/"concat(str('uniprotkb:'),?acc)"/]
v1 --o bind1
bind1 --as--o v2
v2 --"rdfs:seeAlso"--> v3
v3 --"up:database"--> c3
v3 --"rdfs:comment"--> v4