sparql-examples

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

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

97_uniprot_encoding_gene_org_name

List UniProtKB proteins with their associated gene and the gene's ORF label

Use at

PREFIX up: <http://purl.uniprot.org/core/>

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