sparql-examples

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

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

62_diseases_involving_enzymes

Find diseases that are thought to be related to enzymes

Use at

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

SELECT
?disease ?diseaseLabel
WHERE {
 ?protein up:enzyme|up:annotation/up:catalyticActivity/up:enzymeClass ?enzyme ;
                   up:annotation ?diseaseAnnotation .
 ?diseaseAnnotation a up:Disease_Annotation ;
                    up:disease ?disease .
 ?disease skos:prefLabel ?diseaseLabel .
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v4("?disease"):::projected 
  v3("?diseaseAnnotation")
  v5("?diseaseLabel"):::projected 
  v2("?enzyme")
  v1("?protein")
  a1((" "))
  a2((" "))
  c6(["up:Disease_Annotation"]):::iri 
  subgraph union0[" Union "]
  subgraph union0l[" "]
    style union0l fill:#abf,stroke-dasharray: 3 3;
    v1 --"up:annotation"-->  a1
    a1 --"up:catalyticActivity"-->  a2
    a2 --"up:enzymeClass"-->  v2
  end
  subgraph union0r[" "]
    style union0r fill:#abf,stroke-dasharray: 3 3;
    v1 --"up:enzyme"-->  v2
  end
  union0r <== or ==> union0l
  end
  v1 --"up:annotation"-->  v3
  v3 --"a"-->  c6
  v3 --"up:disease"-->  v4
  v4 --"skos:prefLabel"-->  v5