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_00217

Proteins associated with an incomplete EC number, no function annotated and high expression in liver

Use at

PREFIX : <http://nextprot.org/rdf/>
PREFIX nextprot_cv: <http://nextprot.org/rdf/terminology/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

SELECT DISTINCT ?entry WHERE {
 ?entry :isoform ?isox.
 ?isox :enzymeClassification / :term / rdfs:label ?eclabel.
 filter regex(?eclabel, '-'^^xsd:string) # incomplete EC number
 ?isox :highExpression /:term /:childOf nextprot_cv:TS-0564. # highly expressed in liver
 {
 ?isox :functionInfo / rdfs:comment ?functext .
 filter(strstarts(?functext,"Probable") || strstarts(?functext,"Putative"))
 }
 UNION
 {
 filter not exists {?isox :functionInfo ?_ } # entries with no function at all
 }
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v5("?_")
  v1("?eclabel")
  v2("?entry"):::projected 
  v4("?functext")
  v3("?isox")
  a1((" "))
  a2((" "))
  a3((" "))
  a4((" "))
  a5((" "))
  c8([":terminology/TS-0564"]):::iri 
  f0[["regex(?eclabel,'-')"]]
  f0 --> v1
  v2 --":isoform"-->  v3
  v3 --":enzymeClassification"-->  a1
  a1 --":term"-->  a2
  a2 --"rdfs:label"-->  v1
  v3 --":highExpression"-->  a3
  a3 --":term"-->  a4
  a4 --":childOf"-->  c8
  subgraph union0[" Union "]
  subgraph union0l[" "]
    style union0l fill:#abf,stroke-dasharray: 3 3;
    f1[["not  "]]
    subgraph f1e0["Exists Clause"]
      e0v1 --":functionInfo"-->  e0v2
      e0v2("?_"):::projected 
      e0v1("?isox"):::projected 
    end
    f1--EXISTS--> f1e0
    f1 --> v3
    f1 --> c11
    f1 --> v5
    v3 --":functionInfo"-->  v5
  end
  subgraph union0r[" "]
    style union0r fill:#abf,stroke-dasharray: 3 3;
    f2[["(starts-with(?functext,'Probable') || starts-with(?functext,'Putative'))"]]
    f2 --> v4
    v3 --":functionInfo"-->  a5
    a5 --"rdfs:comment"-->  v4
  end
  union0r <== or ==> union0l
  end