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_09426

Check there are no entries which are PE2-PE4 with an expression-info annotation of GOLD quality which has a description which contains "(at protein level)" and evidence assigned by neXtProt

Use at

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

select distinct ?entry where {
  ?entry a :Entry.
  ?entry :existence ?pe.
  filter ( ?pe not in (:Evidence_at_protein_level,:Uncertain ))
  ?entry :isoform ?iso .
  ?iso :expressionInfo ?ex.
  ?ex :evidence /:assignedBy source:NextProt.
  ?ex :quality :GOLD.
  ?ex rdfs:comment ?comment
  filter (contains(?comment, "(at protein level)"))
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v1("?comment")
  v3("?entry"):::projected 
  v5("?ex")
  v4("?iso")
  v2("?pe")
  a1((" "))
  c5([":Entry"]):::iri 
  c13([":GOLD"]):::iri 
  c11([":source/NextProt"]):::iri 
  f0[["contains(?comment,'(at protein level)')"]]
  f0 --> v1
  f1[["?pe != ':Evidence_at_protein_level'?pe != ':Uncertain'"]]
  f1 --> v2
  v3 --"a"-->  c5
  v3 --":existence"-->  v2
  v3 --":isoform"-->  v4
  v4 --":expressionInfo"-->  v5
  v5 --":evidence"-->  a1
  a1 --":assignedBy"-->  c11
  v5 --":quality"-->  c13
  v5 --"rdfs:comment"-->  v1