sparql-examples

A set of SPARQL examples that are used in different SIB resources

View the Project on GitHub sib-swiss/sparql-examples

NXQ_09467

rq turtle/ttl

Check there are no entries with a ptm info annotation referring to S-nitrosylation that do not have the keyword S-nitrosylation (KW-0702)

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,"S-nitrosylat")). # Finds S-nitrosylated and S-nitrosylatation
  filter not exists {?iso :ptmInfo /:negativeEvidence ?negev} # No negative annotations from neXtProt
  filter not exists {?entry :isoform /:keyword /:term cv:KW-0702.}
}
:isoform
:keyword
:term
:ptmInfo
:negativeEvidence
:isoform
:ptmInfo
rdfs:comment
EXISTS
EXISTS
Exists Clause
:ptmInfo
:negativeEvidence
?iso
?negev
Exists Clause
:isoform
:keyword
:term
?entry
:terminology/KW-0702
?entry
?iso
?negev
?text
:terminology/KW-0702
not
c1
c2
c3
not
c5
c6
contains(?text,'S-nitrosylat')