sparql-examples

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

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

66_distinct_rhea_transport_in_reviewed_uniprot

Count number of unique Rhea transport reactions annotated in reviewed UniProtKB entries.

Use at

PREFIX rh: <http://rdf.rhea-db.org/>
PREFIX up: <http://purl.uniprot.org/core/>

SELECT
(COUNT(DISTINCT ?rhea) AS ?distinctRheaTransportInUniProt)
WHERE
{
  GRAPH <https://sparql.rhea-db.org/rhea> {
    ?rhea rh:isTransport true .
  }
  ?protein up:annotation ?ann .
  ?ann up:catalyticActivity ?ca .
  ?ca up:catalyzedReaction ?rhea .
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v3("?ann")
  v4("?ca")
  v5("?distinctRheaTransportInUniProt")
  v2("?protein")
  v1("?rhea"):::projected 
  c2(["true^^xsd:boolean"]):::literal 
  v1 --"rh:isTransport"-->  c2
  v2 --"up:annotation"-->  v3
  v3 --"up:catalyticActivity"-->  v4
  v4 --"up:catalyzedReaction"-->  v1
  bind1[/"count(?rhea)"/]
  v1 --o bind1
  bind1 --as--o v5