sparql-examples

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

View the Project on GitHub ytirlet/sparql-examples

M52_subcellular_location

rq turtle/ttl

protein, annotation and location

Use at

PREFIX up: <http://purl.uniprot.org/core/>
    PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
    PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT ?protein ?annotation ?location_inside_cell ?cellcpt
WHERE {
	?protein up:annotation ?annotation.
	?protein rdf:type up:Protein.
	?annotation up:locatedIn/up:cellularComponent ?cellcpt.
	?cellcpt skos:prefLabel ?location_inside_cell.
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v2("?annotation"):::projected 
  v3("?cellcpt"):::projected 
  v4("?location_inside_cell"):::projected 
  v1("?protein"):::projected 
  a1((" "))
  c3(["up:Protein"]):::iri 
  v1 --"up:annotation"-->  v2
  v1 --"a"-->  c3
  v2 --"up:locatedIn"-->  a1
  a1 --"up:cellularComponent"-->  v3
  v3 --"skos:prefLabel"-->  v4