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_09635

Check there are no entries with a variant annotation with the end greater than the sequence length

Use at

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

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