A set of SPARQL examples that are used in different SIB resources
For a given lipid (SWISSLIPID:000399814, Ceramide), return a list of all enzymes in UniProtKB/Swiss-Prot annotated to catalyze reactions involving that lipid. This query does not consider the hierarchy: it looks for reactions and enzymes only for the specified lipid.
PREFIX SWISSLIPID: <https://swisslipids.org/rdf/SLM_>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rh: <http://rdf.rhea-db.org/>
PREFIX up: <http://purl.uniprot.org/core/>
# Example 16
SELECT ?startId ?startName ?uniprot
WHERE
{
# SwissLipids query (list of) identifier(s)
VALUES ?startId { SWISSLIPID:000399814 }
# name
?startId rdfs:label ?startName .
# ChEBI x-ref
?startId owl:equivalentClass ?chebi .
# federated query to Rhea
SERVICE <https://sparql.rhea-db.org/sparql> {
?rhea rh:side/rh:contains/rh:compound/rh:chebi ?chebi .
}
# federated query to UniProt
SERVICE <https://sparql.uniprot.org/sparql> {
?uniprot up:reviewed true .
?uniprot up:annotation/up:catalyticActivity/up:catalyzedReaction ?rhea .
}
}
ORDER BY ?startId
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?chebi")
v4("?rhea")
v2("?startId"):::projected
v2("?startName"):::projected
v5("?uniprot"):::projected
a1((" "))
a2((" "))
a3((" "))
a4((" "))
a5((" "))
c10(["true^^xsd:boolean"]):::literal
bind0[/VALUES ?startId/]
bind0-->v2
bind00(["SWISSLIPID:000399814"])
bind00 --> bind0
v2 --"rdfs:label"--> v2
v2 --"owl:equivalentClass"--> v3
subgraph s1["https://sparql.rhea-db.org/sparql"]
style s1 stroke-width:4px;
v4 --"rh:side"--> a1
a1 --"rh:contains"--> a2
a2 --"rh:compound"--> a3
a3 --"rh:chebi"--> v3
end
subgraph s2["https://sparql.uniprot.org/sparql"]
style s2 stroke-width:4px;
v5 --"up:reviewed"--> c10
v5 --"up:annotation"--> a4
a4 --"up:catalyticActivity"--> a5
a5 --"up:catalyzedReaction"--> v4
end