A set of SPARQL examples that are used in different SIB resources
Check there are no protein families with no entry associated
PREFIX : <http://nextprot.org/rdf/>
PREFIX cv: <http://nextprot.org/rdf/terminology/>
select distinct ?famac where {
?fam a :FamilyInfo .
?fam :accession ?famac .
filter not exists {?member :family / :accession ?famac .}
}
order by ?famac
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?fam")
v1("?famac"):::projected
v2("?member")
a1((" "))
c4([":FamilyInfo"]):::iri
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0v1 --":family"--> e0a1
e0a1 --":accession"--> e0v2
e0v2("?famac"):::projected
e0v1("?member"):::projected
e0a1((" ")):::projected
end
f0--EXISTS--> f0e0
f0 --> v2
f0 --> c1
f0 --> a1
f0 --> c2
f0 --> v1
v2 --":family"--> a1
a1 --":accession"--> v1
v3 --"a"--> c4
v3 --":accession"--> v1