A set of SPARQL examples that are used in different SIB resources
Check there are no entries with a gene name which does not contain a capital letter or is not "unknown"
PREFIX : <http://nextprot.org/rdf/>
PREFIX cv: <http://nextprot.org/rdf/terminology/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
select distinct ?entry ?name where {
?entry :gene / :name / rdfs:label ?name .
filter (!regex (?name,'[A-Z]'))
filter (!regex (?name,'unknown'))
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?entry"):::projected
v1("?name"):::projected
a1((" "))
a2((" "))
f0[["not regex(?name,'unknown')"]]
f0 --> v1
f1[["not regex(?name,'#91;A-Z#93;')"]]
f1 --> v1
v2 --":gene"--> a1
a1 --":name"--> a2
a2 --"rdfs:label"--> v1