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_00145

Proteins which include a mature chain of less or equal to 50 amino acid residues whose C-terminus is amidated

Use at

PREFIX : <http://nextprot.org/rdf/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

SELECT DISTINCT ?entry WHERE {
?entry :isoform ?isoform.
?isoform :ptm ?ptm.
?ptm rdfs:comment ?comment.
filter regex(?comment, "amid","i")
?ptm :start ?ptmpos .
?isoform :matureProtein [ :start ?mstart ; :end ?mend]
filter ((?mend = ?ptmpos) && (?mend-?mstart < 50))
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v4("?comment")
  v5("?entry"):::projected 
  v6("?isoform")
  v1("?mend")
  v3("?mstart")
  v7("?ptm")
  v2("?ptmpos")
  a1((" "))
  f0[["?mend = ?ptmpos?mend - ?mstart < '50^^xsd:integer'"]]
  f0 --> v1
  f0 --> v2
  f0 --> v3
  f1[["regex(?comment,'amid','i')"]]
  f1 --> v4
  v5 --":isoform"-->  v6
  v6 --":ptm"-->  v7
  v7 --"rdfs:comment"-->  v4
  v7 --":start"-->  v2
  a1 --":start"-->  v3
  a1 --":end"-->  v1
  v6 --":matureProtein"-->  a1