sparql-examples

A set of SPARQL examples that are used in different SIB resources

View the Project on GitHub sib-swiss/sparql-examples

neXtProt/NXQ_09422

Check there are no entries whose gene is located on chromosome "unknown" which that have a beginning position which is NOT "0"

Use at

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 "unknown"^^xsd:string .
  ?gene :begin ?begin.
  filter (?begin = "0"^^xsd:string )
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v1("?begin")
  v2("?entry"):::projected 
  v3("?gene")
  c4(["unknown"]):::literal 
  f0[["?begin = '0'"]]
  f0 --> v1
  v2 --":gene"-->  v3
  v3 --":chromosome"-->  c4
  v3 --":begin"-->  v1