A set of SPARQL examples that are used in different SIB resources
Check there are no entries which are PE2-PE4 with a ptm information annotation with positive GOLD experimental evidence from neXtProt and "phosphorylated" in the text
PREFIX : <http://nextprot.org/rdf/>
PREFIX cv: <http://nextprot.org/rdf/terminology/>
PREFIX source: <http://nextprot.org/rdf/source/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
select distinct ?entry where {
?entry a :Entry.
?entry :existence ?pe.
filter ( ?pe not in (:Evidence_at_protein_level,:Uncertain ))
?entry :isoform ?iso.
?iso :ptmInfo ?ptm.
?ptm rdfs:comment ?txt.
filter (regex (?txt,'phosphorylated'))
?ptm :evidence ?ev.
?ev :assignedBy source:NextProt.
?ev :quality :GOLD.
filter not exists {?ev :negative 1.}
?ev :evidenceCode cv:ECO_0000006. # experimental evidence
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?entry"):::projected
v1("?ev")
v5("?iso")
v3("?pe")
v6("?ptm")
v2("?txt")
c18([":terminology/ECO_0000006"]):::iri
c2(["1^^xsd:integer"]):::literal
c7([":Entry"]):::iri
c16([":GOLD"]):::iri
c14([":source/NextProt"]):::iri
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0v1 --":negative"--> e0c2
e0v1("?ev"):::projected
e0c2(["1^^xsd:integer"]):::literal
end
f0--EXISTS--> f0e0
f0 --> v1
f0 --> c1
f0 --> c2
v1 --":negative"--> c2
f1[["regex(?txt,'phosphorylated')"]]
f1 --> v2
f2[["?pe != ':Evidence_at_protein_level'?pe != ':Uncertain'"]]
f2 --> v3
v4 --"a"--> c7
v4 --":existence"--> v3
v4 --":isoform"--> v5
v5 --":ptmInfo"--> v6
v6 --"rdfs:comment"--> v2
v6 --":evidence"--> v1
v1 --":assignedBy"--> c14
v1 --":quality"--> c16
v1 --":evidenceCode"--> c18