A set of SPARQL examples that are used in different SIB resources
List all UniProtKB SwissProt entries, facilitation the transport of lipids.
PREFIX up: <http://purl.uniprot.org/core/>
PREFIX rh: <http://rdf.rhea-db.org/>
PREFIX CHEBI: <http://purl.obolibrary.org/obo/CHEBI_>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX taxon: <http://purl.uniprot.org/taxonomy/>
SELECT
?protein
?chebi
WHERE {
?rhea rh:isTransport true .
?rhea rh:side/rh:contains/rh:compound ?compound .
?compound (rh:chebi|(rh:reactivePart/rh:chebi)|(rh:underlyingChebi/rh:chebi)) ?chebi .
# CHEBI:18059 is the class for all Lipids
?chebi rdfs:subClassOf* CHEBI:18059 .
# Select human reviewed entries from Swiss-Prot
?protein up:reviewed true ;
up:organism taxon:9606 .
# Link protein to catalytic activity, then to Rhea reaction
?protein up:annotation?annotation .
?annotation up:catalyticActivity?catalytic_activity_obj .
?catalytic_activity up:catalyzedReaction?rhea .
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?annotation")
v7("?catalytic_activity")
v6("?catalytic_activity_obj")
v3("?chebi"):::projected
v2("?compound")
v4("?protein"):::projected
v1("?rhea")
a1((" "))
a2((" "))
a3((" "))
a4((" "))
c13(["taxon:9606"]):::iri
c2(["true^^xsd:boolean"]):::literal
c10(["CHEBI:18059"]):::iri
v1 --"rh:isTransport"--> c2
v1 --"rh:side"--> a1
a1 --"rh:contains"--> a2
a2 --"rh:compound"--> v2
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;
v2 --"rh:underlyingChebi"--> a4
a4 --"rh:chebi"--> v3
end
subgraph union1r[" "]
style union1r fill:#abf,stroke-dasharray: 3 3;
v2 --"rh:reactivePart"--> a3
a3 --"rh:chebi"--> v3
end
union1r <== or ==> union1l
end
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v2 --"rh:chebi"--> v3
end
union0r <== or ==> union0l
end
v3 --"rdfs:subClassOf"--> c10
v4 --"up:reviewed"--> c2
v4 --"up:organism"--> c13
v4 --"up:annotation"--> v5
v5 --"up:catalyticActivity"--> v6
v7 --"up:catalyzedReaction"--> v1