sparql-examples

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

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

uniprot_encoding_gene_name_alternative_name

List UniProtKB proteins with their associated gene and the gene's names that are used in the field, but not recommended for use by UniProtKB

Use at

PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX up: <http://purl.uniprot.org/core/>

SELECT ?protein
  ?gene ?altGeneName
WHERE {
  ?protein a up:Protein ;
           up:encodedBy ?gene .
  ?gene skos:altLabel ?altGeneName .
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v3("?altGeneName"):::projected 
  v2("?gene"):::projected 
  v1("?protein"):::projected 
  c2(["up:Protein"]):::iri 
  v1 --"a"-->  c2
  v1 --"up:encodedBy"-->  v2
  v2 --"skos:altLabel"-->  v3