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_09458

Check there are no entries with a ptm info annotation referring to ADP-ribosylation that do not have the keyword ADP-ribosylation (KW-0013)

Use at

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

select distinct ?entry where {  # Include ?text if result is not 0 to identify problem site
  ?entry :isoform ?iso.
  ?iso :ptmInfo /rdfs:comment ?text.
  filter(contains(?text,"ADP-ribosylat")). # Finds ADP-ribosylated and ADP-ribosylation
  filter not exists {?iso :ptmInfo /:negativeEvidence ?negev} # No negative annotations from neXtProt
  filter not exists {?entry :isoform /:keyword /:term cv:KW-0013.}
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v1("?entry"):::projected 
  v2("?iso")
  v3("?negev")
  v4("?text")
  a4((" "))
  a3((" "))
  a1((" "))
  a2((" "))
  c4([":terminology/KW-0013"]):::iri 
  f0[["not  "]]
  subgraph f0e0["Exists Clause"]
    e0v1 --":isoform"-->  e0a1
    e0a1 --":keyword"-->  e0a2
    e0a2 --":term"-->  e0c4
    e0v1("?entry"):::projected 
    e0a1((" ")):::projected 
    e0a2((" ")):::projected 
    e0c4([":terminology/KW-0013"]):::iri 
  end
  f0--EXISTS--> f0e0
  f0 --> v1
  f0 --> c1
  f0 --> a1
  f0 --> c2
  f0 --> a2
  f0 --> c3
  f0 --> c4
  v1 --":isoform"-->  a1
  a1 --":keyword"-->  a2
  a2 --":term"-->  c4
  f1[["not  "]]
  subgraph f1e1["Exists Clause"]
    e1v1 --":ptmInfo"-->  e1a1
    e1a1 --":negativeEvidence"-->  e1v2
    e1v1("?iso"):::projected 
    e1v2("?negev"):::projected 
    e1a1((" ")):::projected 
  end
  f1--EXISTS--> f1e1
  f1 --> v2
  f1 --> c5
  f1 --> a3
  f1 --> c6
  f1 --> v3
  v2 --":ptmInfo"-->  a3
  a3 --":negativeEvidence"-->  v3
  f2[["contains(?text,'ADP-ribosylat')"]]
  f2 --> v4
  v1 --":isoform"-->  v2
  v2 --":ptmInfo"-->  a4
  a4 --"rdfs:comment"-->  v4