A set of SPARQL examples that are used in different SIB resources
Find UniProtKB entries with more than 1 Topological domain annotation
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX up: <http://purl.uniprot.org/core/>
SELECT
?protein
(GROUP_CONCAT(?comment; separator=", ") AS ?comments)
WHERE
{
?protein a up:Protein ;
up:annotation ?annotation .
?annotation rdf:type up:Topological_Domain_Annotation ;
rdfs:comment ?comment .
}
GROUP BY ?protein
HAVING (COUNT(?annotation) > 1)
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?_anon_524857e97b124dceaa8a4ecc8d1a18276082")
v2("?annotation")
v3("?comment"):::projected
v5("?comments")
v1("?protein"):::projected
a1((" "))
c5(["up:Topological_Domain_Annotation"]):::iri
c3(["up:Protein"]):::iri
f0[[" > '1^^xsd:integer'"]]
f0 --> a1
v1 --"a"--> c3
v1 --"up:annotation"--> v2
v2 --"a"--> c5
v2 --"rdfs:comment"--> v3
bind3[/"count(?annotation)"/]
v2 --o bind3
bind3 --as--o v4
bind4[/"?comment"/]
v3 --o bind4
bind4 --as--o v5