sparql-examples

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

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

21

Find where disease related proteins are known to be located in the cell

Use at

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


SELECT 
    ?protein 
    ?disease 
    ?location_inside_cell 
    ?cellcmpt
WHERE
{
    ?protein up:annotation ?diseaseAnnotation , ?subcellAnnotation .
    ?diseaseAnnotation up:disease/skos:prefLabel ?disease .
    ?subcellAnnotation up:locatedIn/up:cellularComponent ?cellcmpt .
    ?cellcmpt skos:prefLabel ?location_inside_cell .
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v5("?cellcmpt"):::projected 
  v4("?disease"):::projected 
  v2("?diseaseAnnotation")
  v6("?location_inside_cell"):::projected 
  v1("?protein"):::projected 
  v3("?subcellAnnotation")
  a1((" "))
  a2((" "))
  v1 --"up:annotation"-->  v2
  v1 --"up:annotation"-->  v3
  v2 --"up:disease"-->  a1
  a1 --"skos:prefLabel"-->  v4
  v3 --"up:locatedIn"-->  a2
  a2 --"up:cellularComponent"-->  v5
  v5 --"skos:prefLabel"-->  v6