A set of SPARQL examples that are used in different SIB resources
Find Hydrolases (enzymes that catalyse the hydrolysis of various bonds) that have at least two transmembrane domains
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX up: <http://purl.uniprot.org/core/>
SELECT
?protein
WHERE {
?protein up:enzyme|up:annotation/up:catalyticActivity/up:enzymeClass ?enzymeClass ;
up:annotation ?transMembraneAnnotation .
?enzymeClass rdfs:subClassOf <http://purl.uniprot.org/enzyme/3.-.-.-> .
?transMembraneAnnotation a up:Transmembrane_Annotation .
} GROUP BY ?protein HAVING (COUNT(DISTINCT ?transMembraneAnnotation) >= 2)
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?_anon_524857e97b124dceaa8a4ecc8d1a18276471")
v2("?enzymeClass")
v1("?protein"):::projected
v3("?transMembraneAnnotation")
a2((" "))
a3((" "))
a1((" "))
c7([http://purl.uniprot.org/enzyme/3.-.-.-]):::iri
c9(["up:Transmembrane_Annotation"]):::iri
f0[[" >= '2^^xsd:integer'"]]
f0 --> a1
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v1 --"up:annotation"--> a2
a2 --"up:catalyticActivity"--> a3
a3 --"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
v2 --"rdfs:subClassOf"--> c7
v3 --"a"--> c9
bind2[/"count(?transMembraneAnnotation)"/]
v3 --o bind2
bind2 --as--o v4