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_00017

Proteins larger than 1000 amino acids that are located in the nucleus and expressed in the nervous system

Use at

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

SELECT DISTINCT ?entry WHERE {
 values ?nucloc {nextprot_cv:GO_0005634 nextprot_cv:SL-0191} # GO and SL values for nucleus

 ?entry :isoform ?iso.
 ?iso :cellularComponent ?loc .
 ?loc :term/:childOf ?nucloc.
 filter not exists {?loc :negativeEvidence ?negev} # No negative localization evidence
 ?iso :detectedExpression/:term/:childOf nextprot_cv:TS-1313.
 ?iso :sequence/:length ?len.
 filter (?len>1000)
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v5("?entry"):::projected 
  v6("?iso")
  v1("?len")
  v2("?loc")
  v3("?negev")
  v4("?nucloc")
  a1((" "))
  a2((" "))
  a3((" "))
  a4((" "))
  c8([":terminology/TS-1313"]):::iri 
  f0[["?len > '1000^^xsd:integer'"]]
  f0 --> v1
  f1[["not  "]]
  subgraph f1e0["Exists Clause"]
    e0v1 --":negativeEvidence"-->  e0v2
    e0v1("?loc"):::projected 
    e0v2("?negev"):::projected 
  end
  f1--EXISTS--> f1e0
  f1 --> v2
  f1 --> c2
  f1 --> v3
  v2 --":negativeEvidence"-->  v3
  bind2[/VALUES ?nucloc/]
  bind2-->v4
  bind20([":terminology/GO_0005634"])
  bind20 --> bind2
  bind21([":terminology/SL-0191"])
  bind21 --> bind2
  v5 --":isoform"-->  v6
  v6 --":cellularComponent"-->  v2
  v2 --":term"-->  a1
  a1 --":childOf"-->  v4
  v6 --":detectedExpression"-->  a2
  a2 --":term"-->  a3
  a3 --":childOf"-->  c8
  v6 --":sequence"-->  a4
  a4 --":length"-->  v1