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_00057

Proteins that are located in the mitochondrion with an experimental evidence originating not from HPA or DKFZ-GFP

Use at

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

SELECT DISTINCT ?entry WHERE {
 values ?mitoloc {nextprot_cv:SL-0173 nextprot_cv:GO_0005739} # SL and GO values for mitochondrion

 ?entry :isoform ?iso.
 ?iso :cellularComponent ?loc.
 ?loc :term /:childOf ?mitoloc.
 filter not exists { ?loc :negativeEvidence ?negev. } # No negative localization evidence
 ?loc :evidence /:assignedBy ?src.
 filter ( ?src not in (source:Human_protein_atlas, source:GFP-cDNAEMBL))
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v5("?entry"):::projected 
  v6("?iso")
  v2("?loc")
  v4("?mitoloc")
  v3("?negev")
  v1("?src")
  a1((" "))
  a2((" "))
  f0[["?src != ':source/Human_protein_atlas'?src != ':source/GFP-cDNAEMBL'"]]
  f0 --> v1
  f1[["not  "]]
  subgraph f1e0["Exists Clause"]
    e0v1 --":negativeEvidence"-->  e0v2
    e0v1("?loc"):::projected 
    e0v2("?negev"):::projected 
  end
  f1--EXISTS--> f1e0
  f1 --> v2
  f1 --> c3
  f1 --> v3
  v2 --":negativeEvidence"-->  v3
  bind2[/VALUES ?mitoloc/]
  bind2-->v4
  bind20([":terminology/SL-0173"])
  bind20 --> bind2
  bind21([":terminology/GO_0005739"])
  bind21 --> bind2
  v5 --":isoform"-->  v6
  v6 --":cellularComponent"-->  v2
  v2 --":term"-->  a1
  a1 --":childOf"-->  v4
  v2 --":evidence"-->  a2
  a2 --":assignedBy"-->  v1