A set of SPARQL examples that are used in different SIB resources
Look for enzymes catalyzing reactions with molecules similar to dopamine.
PREFIX CHEBI: <http://purl.obolibrary.org/obo/CHEBI_>
PREFIX rh: <http://rdf.rhea-db.org/>
PREFIX sachem: <http://bioinfo.uochb.cas.cz/rdf/v1.0/sachem#>
PREFIX up: <http://purl.uniprot.org/core/>
SELECT
?protein
?rhea
?chebi
WHERE {
# Use the smiles of dopamine CHEBI:18243
SERVICE <https://idsm.elixir-czech.cz/sparql/endpoint/chebi>{
?chebi sachem:similarCompoundSearch [
sachem:query "NCCc1ccc(O)c(O)c1" ] .
}
GRAPH<https://sparql.rhea-db.org/rhea>{
?rhea rh:side/rh:contains/rh:compound ?compound .
?compound (rh:chebi|(rh:reactivePart/rh:chebi)|(rh:underlyingChebi/rh:chebi)) ?chebi .
}
?protein up:reviewed true ;
up:annotation ?caa .
?caa up:catalyticActivity/up:catalyzedReaction ?rhea .
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?caa")
v1("?chebi"):::projected
v3("?compound")
v4("?protein"):::projected
v2("?rhea"):::projected
a1((" "))
a2((" "))
a3((" "))
a4((" "))
a5((" "))
a6((" "))
c13(["true^^xsd:boolean"]):::literal
c3(["NCCc1ccc(O)c(O)c1"]):::literal
subgraph s1["https://idsm.elixir-czech.cz/sparql/endpoint/chebi"]
style s1 stroke-width:4px;
a1 --"sachem:query"--> c3
v1 --"sachem:similarCompoundSearch"--> a1
end
v2 --"rh:side"--> a2
a2 --"rh:contains"--> a3
a3 --"rh:compound"--> v3
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
subgraph union1[" Union "]
subgraph union1l[" "]
style union1l fill:#abf,stroke-dasharray: 3 3;
v3 --"rh:underlyingChebi"--> a5
a5 --"rh:chebi"--> v1
end
subgraph union1r[" "]
style union1r fill:#abf,stroke-dasharray: 3 3;
v3 --"rh:reactivePart"--> a4
a4 --"rh:chebi"--> v1
end
union1r <== or ==> union1l
end
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v3 --"rh:chebi"--> v1
end
union0r <== or ==> union0l
end
v4 --"up:reviewed"--> c13
v4 --"up:annotation"--> v5
v5 --"up:catalyticActivity"--> a6
a6 --"up:catalyzedReaction"--> v2