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_09407

Check there are no entries with peptide mapping annotations with peptides of length 6 aa or less

Use at

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

select distinct ?entry where {
  ?entry :isoform / :peptideMapping /:position ?pmpos .
  ?pmpos :start ?start; :end ?end .
  filter((?end - ?start + 1) <= 6 )
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v1("?end")
  v3("?entry"):::projected 
  v4("?pmpos")
  v2("?start")
  a1((" "))
  a2((" "))
  f0[["?end - ?start + '1^^xsd:integer' <= '6^^xsd:integer'"]]
  f0 --> v1
  f0 --> v2
  v3 --":isoform"-->  a1
  a1 --":peptideMapping"-->  a2
  a2 --":position"-->  v4
  v4 --":start"-->  v2
  v4 --":end"-->  v1