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_09636

Check there are no entries with a variant annotation with the end less than the start

Use at

PREFIX : <http://nextprot.org/rdf/>
PREFIX cv: <http://nextprot.org/rdf/terminology/>

select distinct ?entry where {
  ?entry :isoform /:variant ?var.
  ?var :start ?start.
  ?var :end ?end.
  filter ( ?end < ?start)
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v1("?end")
  v3("?entry"):::projected 
  v2("?start")
  v4("?var")
  a1((" "))
  f0[["?end < ?start"]]
  f0 --> v1
  f0 --> v2
  v3 --":isoform"-->  a1
  a1 --":variant"-->  v4
  v4 --":start"-->  v2
  v4 --":end"-->  v1