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_00240

Gold binary interactions with other human proteins

Use at

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

SELECT DISTINCT ?entry ?interactant WHERE {
 ?entry :isoform ?iso.
 ?entry :isoform/:binaryInteraction ?interaction.
 ?interaction :interactant ?interactant; :quality :GOLD.
 filter not exists { ?interactant a :Xref . }
 filter(?interactant != ?entry) # remove self-interacting proteins
}
order by ?entry
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v1("?entry"):::projected 
  v2("?interactant"):::projected 
  v4("?interaction")
  v3("?iso")
  a1((" "))
  c2([":Xref"]):::iri 
  c7([":GOLD"]):::iri 
  f0[["?interactant != ?entry"]]
  f0 --> v2
  f0 --> v1
  f1[["not  "]]
  subgraph f1e0["Exists Clause"]
    e0v1 --"a"-->  e0c2
    e0v1("?interactant"):::projected 
    e0c2([":Xref"]):::iri 
  end
  f1--EXISTS--> f1e0
  f1 --> v2
  f1 --> c1
  f1 --> c2
  v2 --"a"-->  c2
  v1 --":isoform"-->  v3
  v1 --":isoform"-->  a1
  a1 --":binaryInteraction"-->  v4
  v4 --":interactant"-->  v2
  v4 --":quality"-->  c7