A set of SPARQL examples that are used in different SIB resources
Check there are no entries with a variant annotation with an xref starting with COSM that do not have evidence from COSMIC
PREFIX : <http://nextprot.org/rdf/>
PREFIX cv: <http://nextprot.org/rdf/terminology/>
PREFIX source: <http://nextprot.org/rdf/source/>
select distinct ?entry where {
?entry :isoform /:variant /:evidence ?ev.
?ev :reference /:accession ?xref.
filter (regex(?xref, "^COSM"))
filter not exists {?ev :assignedBy source:Cosmic.}
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?entry"):::projected
v1("?ev")
v2("?xref")
a1((" "))
a2((" "))
a3((" "))
c2([":source/Cosmic"]):::iri
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0v1 --":assignedBy"--> e0c2
e0v1("?ev"):::projected
e0c2([":source/Cosmic"]):::iri
end
f0--EXISTS--> f0e0
f0 --> v1
f0 --> c1
f0 --> c2
v1 --":assignedBy"--> c2
f1[["regex(?xref,'^COSM')"]]
f1 --> v2
v3 --":isoform"--> a1
a1 --":variant"--> a2
a2 --":evidence"--> v1
v1 --":reference"--> a3
a3 --":accession"--> v2