A set of SPARQL examples that are used in different SIB resources
Check there are no entries whose gene is located on chromosome "unknown" for which the strand is NOT unknown
PREFIX : <http://nextprot.org/rdf/>
PREFIX cv: <http://nextprot.org/rdf/terminology/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
select distinct ?entry ?strand where {
?entry :gene ?gene .
?gene :chromosome "unknown"^^xsd:string .
?gene :strand ?strand .
filter (!regex (?strand, '0'))
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?entry"):::projected
v3("?gene")
v1("?strand"):::projected
c4(["unknown"]):::literal
f0[["not regex(?strand,'0')"]]
f0 --> v1
v2 --":gene"--> v3
v3 --":chromosome"--> c4
v3 --":strand"--> v1