A set of SPARQL examples that are used in different SIB resources
Check there are no entries with a ptm info annotation referring to methylation that do not have the keyword Methylation (KW-0488)
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,"methylat")). # Finds methylated and methylation
filter not exists {?iso :ptmInfo /:negativeEvidence ?negev} # No negative annotations from neXtProt
filter not exists {?entry :isoform /:keyword /:term cv:KW-0488.}
filter (?entry not in (entry:NX_Q93100, entry:NX_P46020, entry:NX_Q9UIF9, entry:NX_Q969L4, entry:NX_Q14683, entry:NX_P46019, entry:NX_P57729)) # Exceptions to rule (not methylated)
}
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((" "))
c11([":terminology/KW-0488"]):::iri
f0[["?entry != ':entry/NX_Q93100'?entry != ':entry/NX_P46020'?entry != ':entry/NX_Q9UIF9'?entry != ':entry/NX_Q969L4'?entry != ':entry/NX_Q14683'?entry != ':entry/NX_P46019'?entry != ':entry/NX_P57729'"]]
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-0488"]):::iri
end
f1--EXISTS--> f1e0
f1 --> v1
f1 --> c8
f1 --> a1
f1 --> c9
f1 --> a2
f1 --> c10
f1 --> c11
v1 --":isoform"--> a1
a1 --":keyword"--> a2
a2 --":term"--> c11
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 --> c12
f2 --> a3
f2 --> c13
f2 --> v3
v2 --":ptmInfo"--> a3
a3 --":negativeEvidence"--> v3
f3[["contains(?text,'methylat')"]]
f3 --> v4
v1 --":isoform"--> v2
v2 --":ptmInfo"--> a4
a4 --"rdfs:comment"--> v4