A set of SPARQL examples that are used in different SIB resources
Check there are no entries with a ptm info annotation referring to glycosylation that do not have the keyword Glycoprotein (KW-0325)
PREFIX : <http://nextprot.org/rdf/>
PREFIX cv: <http://nextprot.org/rdf/terminology/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX entry: <http://nextprot.org/rdf/entry/>
select distinct ?entry where { # Include ?text if result is not 0 to identify problem site
?entry :isoform ?iso.
?iso :ptmInfo /rdfs:comment ?text.
filter(contains(?text,"glycosylat")). # Finds glycosylated and glycosylation
filter not exists {?iso :ptmInfo /:negativeEvidence ?negev} # No negative annotations from neXtProt
filter not exists {?entry :isoform /:keyword /:term cv:KW-0325.}
filter (?entry not in (entry:NX_O43866, entry:NX_P60827, entry:NX_O75452, entry:NX_P60033, entry:NX_Q01628, entry:NX_O75192, entry:NX_Q8TCT6, entry:NX_Q86TM6, entry:NX_Q8TC12, entry:NX_P49788, entry:NX_Q9NUD9, entry:NX_P47710, entry:NX_Q8IY95, entry:NX_Q02447, entry:NX_P49238, entry:NX_Q9BSG5, entry:NX_Q8TF71, entry:NX_P51811, entry:NX_Q9UBT3, entry:NX_Q9UBY8)) # Exceptions to rule (not glycosylated)
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?entry"):::projected
v2("?iso")
v3("?negev")
v4("?text")
a4((" "))
a3((" "))
a1((" "))
a2((" "))
c24([":terminology/KW-0325"]):::iri
f0[["?entry != ':entry/NX_O43866'?entry != ':entry/NX_P60827'?entry != ':entry/NX_O75452'?entry != ':entry/NX_P60033'?entry != ':entry/NX_Q01628'?entry != ':entry/NX_O75192'?entry != ':entry/NX_Q8TCT6'?entry != ':entry/NX_Q86TM6'?entry != ':entry/NX_Q8TC12'?entry != ':entry/NX_P49788'?entry != ':entry/NX_Q9NUD9'?entry != ':entry/NX_P47710'?entry != ':entry/NX_Q8IY95'?entry != ':entry/NX_Q02447'?entry != ':entry/NX_P49238'?entry != ':entry/NX_Q9BSG5'?entry != ':entry/NX_Q8TF71'?entry != ':entry/NX_P51811'?entry != ':entry/NX_Q9UBT3'?entry != ':entry/NX_Q9UBY8'"]]
f0 --> v1
f1[["not "]]
subgraph f1e0["Exists Clause"]
e0v1 --":isoform"--> e0a1
e0a1 --":keyword"--> e0a2
e0a2 --":term"--> e0c4
e0v1("?entry"):::projected
e0a1((" ")):::projected
e0a2((" ")):::projected
e0c4([":terminology/KW-0325"]):::iri
end
f1--EXISTS--> f1e0
f1 --> v1
f1 --> c21
f1 --> a1
f1 --> c22
f1 --> a2
f1 --> c23
f1 --> c24
v1 --":isoform"--> a1
a1 --":keyword"--> a2
a2 --":term"--> c24
f2[["not "]]
subgraph f2e1["Exists Clause"]
e1v1 --":ptmInfo"--> e1a1
e1a1 --":negativeEvidence"--> e1v2
e1v1("?iso"):::projected
e1v2("?negev"):::projected
e1a1((" ")):::projected
end
f2--EXISTS--> f2e1
f2 --> v2
f2 --> c25
f2 --> a3
f2 --> c26
f2 --> v3
v2 --":ptmInfo"--> a3
a3 --":negativeEvidence"--> v3
f3[["contains(?text,'glycosylat')"]]
f3 --> v4
v1 --":isoform"--> v2
v2 --":ptmInfo"--> a4
a4 --"rdfs:comment"--> v4