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_00144

Proteins that contains a sequence "QHP" where the Proline is amidated

Use at

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

SELECT DISTINCT ?entry WHERE {
?entry :isoform ?isoform.
?isoform :ptm ?ptm.
?ptm :term nextprot_cv:PTM-0257 . # Proline amide
?ptm :start ?ptmpos .
?isoform :sequence / :chain ?seq.
bind(substr(?seq, ?ptmpos-2, 3) as ?modseq)
filter ( regex(?modseq, "QHP") )
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v2("?entry"):::projected 
  v3("?isoform")
  v7("?modseq")
  v4("?ptm")
  v5("?ptmpos")
  v6("?seq")
  a1((" "))
  c5([":terminology/PTM-0257"]):::iri 
  f0[["regex(?modseq,'QHP')"]]
  f0 --> v7
  v2 --":isoform"-->  v3
  v3 --":ptm"-->  v4
  v4 --":term"-->  c5
  v4 --":start"-->  v5
  v3 --":sequence"-->  a1
  a1 --":chain"-->  v6
  bind1[/"substring(?seq,?ptmpos + '-2^^xsd:integer','3^^xsd:integer')"/]
  v6 --o bind1
  v5 --o bind1
  bind1 --as--o v7