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_00059

Proteins that are glycosylated and phosphorylated on an extracellular topological domain

Use at

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

SELECT DISTINCT ?entry WHERE {
 ?entry :isoform ?iso.
 ?iso :topologicalDomain ?topodom.
 ?topodom :term nextprot_cv:CVTO_0002.
 ?topodom :start ?topostart ; :end ?topoend.
 ?iso :positionalAnnotation ?annot,?annot2.
 ?annot a :ModifiedResidue.
 ?annot :term ?ptmtype.
 filter (?ptmtype in (nextprot_cv:PTM-0253, nextprot_cv:PTM-0254, nextprot_cv:PTM-0255))
 ?annot2 a :GlycosylationSite.
 ?annot :start ?ptmpos.
 ?annot2 :start ?glypos.
 filter ((?ptmpos >= ?topostart) && (?ptmpos <= ?topoend))
 filter ((?glypos >= ?topostart) && (?glypos <= ?topoend))
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v9("?annot")
  v10("?annot2")
  v6("?entry"):::projected 
  v1("?glypos")
  v7("?iso")
  v4("?ptmpos")
  v5("?ptmtype")
  v8("?topodom")
  v3("?topoend")
  v2("?topostart")
  c13([":GlycosylationSite"]):::iri 
  c7([":terminology/CVTO_0002"]):::iri 
  c12([":ModifiedResidue"]):::iri 
  f0[["?glypos >= ?topostart?glypos <= ?topoend"]]
  f0 --> v1
  f0 --> v2
  f0 --> v3
  f1[["?ptmpos >= ?topostart?ptmpos <= ?topoend"]]
  f1 --> v4
  f1 --> v2
  f1 --> v3
  list0c3([":terminology/PTM-0255"]):::iri 
  list0c1([":terminology/PTM-0253"]):::iri 
  list0c2([":terminology/PTM-0254"]):::iri 
  list0c1 --o f2
  list0c2 --o f2
  list0c3 --o f2
  f2[[" in "]]
  f2 --> v5
  v6 --":isoform"-->  v7
  v7 --":topologicalDomain"-->  v8
  v8 --":term"-->  c7
  v8 --":start"-->  v2
  v8 --":end"-->  v3
  v7 --":positionalAnnotation"-->  v9
  v7 --":positionalAnnotation"-->  v10
  v9 --"a"-->  c12
  v9 --":term"-->  v5
  v10 --"a"-->  c13
  v9 --":start"-->  v4
  v10 --":start"-->  v1