A set of SPARQL examples that are used in different SIB resources
Check there are no entries with a modified residue annotation specifying an acetylation site that do not have the keyword Acetylation (KW-0007)
PREFIX : <http://nextprot.org/rdf/>
PREFIX cv: <http://nextprot.org/rdf/terminology/>
select distinct ?entry where { # Include ?acetyl if result is not 0 to identify problem site
?acetyl a :UniprotPtmCv.
cv:KW-0007 :related ?acetyl.
?entry :isoform ?iso.
?iso :modifiedResidue ?mod.
?mod :term ?acetyl.
filter not exists {?mod :negativeEvidence ?negev} # No negative evidence
filter not exists {?entry :isoform /:keyword /:term cv:KW-0007.}
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?acetyl")
v1("?entry"):::projected
v5("?iso")
v2("?mod")
v3("?negev")
a1((" "))
a2((" "))
c7([":UniprotPtmCv"]):::iri
c4([":terminology/KW-0007"]):::iri
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0v1 --":isoform"--> e0a1
e0a1 --":keyword"--> e0a2
e0a2 --":term"--> e0c4
e0v1("?entry"):::projected
e0a1((" ")):::projected
e0a2((" ")):::projected
e0c4([":terminology/KW-0007"]):::iri
end
f0--EXISTS--> f0e0
f0 --> v1
f0 --> c1
f0 --> a1
f0 --> c2
f0 --> a2
f0 --> c3
f0 --> c4
v1 --":isoform"--> a1
a1 --":keyword"--> a2
a2 --":term"--> c4
f1[["not "]]
subgraph f1e1["Exists Clause"]
e1v1 --":negativeEvidence"--> e1v2
e1v1("?mod"):::projected
e1v2("?negev"):::projected
end
f1--EXISTS--> f1e1
f1 --> v2
f1 --> c5
f1 --> v3
v2 --":negativeEvidence"--> v3
v4 --"a"--> c7
c4 --":related"--> v4
v1 --":isoform"--> v5
v5 --":modifiedResidue"--> v2
v2 --":term"--> v4