A set of SPARQL examples that are used in different SIB resources
Check there are no entries whose gene is located on chromosome MT which have a band
PREFIX : <http://nextprot.org/rdf/>
PREFIX cv: <http://nextprot.org/rdf/terminology/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
select distinct ?entry where {
?entry :gene ?gene .
?gene :chromosome "MT"^^xsd:string .
filter not exists {?gene :band ?_ }
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?_")
v3("?entry"):::projected
v1("?gene")
c4(["MT"]):::literal
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0v1 --":band"--> e0v2
e0v2("?_"):::projected
e0v1("?gene"):::projected
end
f0--EXISTS--> f0e0
f0 --> v1
f0 --> c1
f0 --> v2
v1 --":band"--> v2
v3 --":gene"--> v1
v1 --":chromosome"--> c4