sparql-examples

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

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

119_uniref_distinct_ec_in_seed

rq turtle/ttl

Distinct Enzymes in UniRef50 seed entries

Use at

PREFIX up:<http://purl.uniprot.org/core/>
SELECT 
  (COUNT(DISTINCT ?enzyme) AS ?distinctEnzymesInUniRef50Seed)
WHERE {
  GRAPH <http://sparql.uniprot.org/uniprot>{
  	?protein ( up:enzyme | up:domain/up:enzyme | up:component/up:enzyme ) ?enzyme .
  }
  GRAPH <http://sparql.uniprot.org/uniref>{
    ?protein up:seedFor ?cluster .
    ?cluster up:identity 0.5 .
  }
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v3("?cluster")
  v4("?distinctEnzymesInUniRef50Seed")
  v2("?enzyme"):::projected 
  v1("?protein")
  a1((" "))
  a2((" "))
  c8(["0.5^^xsd:decimal"]):::literal 
  subgraph union0[" Union "]
  subgraph union0l[" "]
    style union0l fill:#abf,stroke-dasharray: 3 3;
    subgraph union1[" Union "]
    subgraph union1l[" "]
      style union1l fill:#abf,stroke-dasharray: 3 3;
      v1 --"up:component"-->  a2
      a2 --"up:enzyme"-->  v2
    end
    subgraph union1r[" "]
      style union1r fill:#abf,stroke-dasharray: 3 3;
      v1 --"up:domain"-->  a1
      a1 --"up:enzyme"-->  v2
    end
    union1r <== or ==> union1l
    end
  end
  subgraph union0r[" "]
    style union0r fill:#abf,stroke-dasharray: 3 3;
    v1 --"up:enzyme"-->  v2
  end
  union0r <== or ==> union0l
  end
  v1 --"up:seedFor"-->  v3
  v3 --"up:identity"-->  c8
  bind1[/"count(?enzyme)"/]
  v2 --o bind1
  bind1 --as--o v4