A set of SPARQL examples that are used in different SIB resources
Proteins with 7 transmembrane regions
PREFIX : <http://nextprot.org/rdf/>
SELECT DISTINCT ?entry WHERE {
?entry :isoform ?iso.
?iso :topology ?statement.
?statement a :TransmembraneRegion.
} group by ?entry ?iso having(count( ?statement)=7)
# 'a' can also be used instead of 'rdf:type'
# 'a' is a synonym of 'rdf:type'
#
# Apply the grouping criterion (group by) for the results.
# This groups entries with isoforms having 7 transmembrane regions.
# Apply the aggregate function (count) to the variable ?statement.
# This counts the number of transmembrane region statements for each isoform.
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?_anon_aaf95e3c346c4c97af230d5bcfeba8ab4721")
v1("?entry"):::projected
v2("?iso")
v3("?statement")
a1((" "))
c5([":TransmembraneRegion"]):::iri
f0[[" = '7^^xsd:integer'"]]
f0 --> a1
v1 --":isoform"--> v2
v2 --":topology"--> v3
v3 --"a"--> c5
bind2[/"count(?statement)"/]
v3 --o bind2
bind2 --as--o v4