CINXE.COM
Rhea
<!DOCTYPE html SYSTEM "about:legacy-compat"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><title>Rhea</title><meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/><link href="/" rel="home"/><link href="/base.css" type="text/css" rel="stylesheet"/><link type="image/vnd.microsoft.icon" href="https://www.rhea-db.org//favicon.ico" rel="shortcut icon"/><link href="/rhea-sparql.css" type="text/css" rel="stylesheet"/><link href="https://creativecommons.org/licenses/by/4.0/" rel="license"/><script src="https://cdn.jsdelivr.net/npm/yasgui-yasqe@2.11.22/dist/yasqe.bundled.min.js"></script><link type="text/css" rel="stylesheet" href="https://cdn.jsdelivr.net/yasqe/2.2/yasqe.min.css"/><meta content="width=device-width, initial-scale=1" name="viewport"/><meta content="no-referrer" name="referrer"/></head><body typeof="schema:WebPage"><header class="row-container"><div class="logos row-container"><a href="https://www.sib.swiss" class="sib_logo"><img src="https://www.rhea-db.org//style/images/sib_logo_short.png" style="height: 50px" alt="SIB logo"/></a><a href="https://www.rhea-db.org" class="rhea_logo"><img src="https://www.rhea-db.org//style/images/rhea_logo.png" style="height: 50px" alt="Rhea logo"/></a></div><nav class="row-container" id="menu"><a href="/" itemprop="url"><svg xmlns="http://www.w3.org/2000/svg" width="24" viewBox="0 0 24 24" height="24"><path fill="none" d="M0 0h24v24H0z"/><path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"/></svg><span itemprop="name">SPARQL</span></a><a href="https://www.rhea-db.org//help/download" itemprop="url"><svg xmlns="http://www.w3.org/2000/svg" width="24" viewBox="0 0 24 24" height="24"><path fill="none" d="M0 0h24v24H0z"/><path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM17 13l-5 5-5-5h3V9h4v4h3z"/></svg><span itemprop="name">Download</span></a><a href="https://www.rhea-db.org//help" itemprop="url"><svg xmlns="http://www.w3.org/2000/svg" width="24" viewBox="0 0 24 24" height="24"><path fill="none" d="M0 0h24v24H0V0z"/><path d="M19.07 4.93l-1.41 1.41C19.1 7.79 20 9.79 20 12c0 4.42-3.58 8-8 8s-8-3.58-8-8c0-4.08 3.05-7.44 7-7.93v2.02C8.16 6.57 6 9.03 6 12c0 3.31 2.69 6 6 6s6-2.69 6-6c0-1.66-.67-3.16-1.76-4.24l-1.41 1.41C15.55 9.9 16 10.9 16 12c0 2.21-1.79 4-4 4s-4-1.79-4-4c0-1.86 1.28-3.41 3-3.86v2.14c-.6.35-1 .98-1 1.72 0 1.1.9 2 2 2s2-.9 2-2c0-.74-.4-1.38-1-1.72V2h-1C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10c0-2.76-1.12-5.26-2.93-7.07z"/></svg><span itemprop="name">Help</span></a><a href="https://www.rhea-db.org//feedback" itemprop="url"><svg xmlns="http://www.w3.org/2000/svg" width="24" viewBox="0 0 24 24" height="24"><path fill="none" d="M0 0h24v24H0z"/><path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/></svg><span itemprop="name">Feedback</span></a></nav></header><a accesskey="2" href="#content" hidden="hidden">Skip Header</a><main class="sparql homepage" id="content"><section id="examples"><h3>Examples</h3><ol><li>Generate a draft human metabolome<a href="/sparql/?queryPREFIX chebislash: <http://purl.obolibrary.org/obo/chebi/> PREFIX rh: <http://rdf.rhea-db.org/> PREFIX taxon: <http://purl.uniprot.org/taxonomy/> PREFIX up: <http://purl.uniprot.org/core/> SELECT ?uniprot ?mnemonic ?rhea ?chebi ?smiles ?inchiKey WHERE { ?rhea rh:side/rh:contains/rh:compound ?compound . ?compound (rh:chebi|(rh:reactivePart/rh:chebi)|(rh:underlyingChebi/rh:chebi)) ?chebi . ?chebi chebislash:smiles ?smiles ; chebislash:inchikey ?inchiKey . SERVICE <https://sparql.uniprot.org/sparql> { ?uniprot up:annotation/up:catalyticActivity/up:catalyzedReaction ?rhea ; up:organism taxon:9606 ; up:mnemonic ?mnemonic . } }" class="exampleQuery">PREFIX chebislash: <http://purl.obolibrary.org/obo/chebi/> PREFIX rh: <http://rdf.rhea-db.org/> PREFIX taxon: <http://purl.uniprot.org/taxonomy/> PREFIX up: <http://purl.uniprot.org/core/> SELECT ?uniprot ?mnemonic ?rhea ?chebi ?smiles ?inchiKey WHERE { ?rhea rh:side/rh:contains/rh:compound ?compound . ?compound (rh:chebi|(rh:reactivePart/rh:chebi)|(rh:underlyingChebi/rh:chebi)) ?chebi . ?chebi chebislash:smiles ?smiles ; chebislash:inchikey ?inchiKey . SERVICE <https://sparql.uniprot.org/sparql> { ?uniprot up:annotation/up:catalyticActivity/up:catalyzedReaction ?rhea ; up:organism taxon:9606 ; up:mnemonic ?mnemonic . } }</a></li><li>Search for Chemical names starting in Japanese, translated to english using allie<a href="/sparql/?queryPREFIX oboInOwl: <http://www.geneontology.org/formats/oboInOwl#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> SELECT * WHERE { SERVICE <https://data.allie.dbcls.jp/sparql>{ ?x rdfs:label "1,2,4-トリクロロベンゼン"@ja ; rdfs:label ?englishLabel . FILTER(lang(?englishLabel) = "en") } BIND(STR(?englishLabel) AS ?englishLabelStr) ?chebi rdfs:label|oboInOwl:hasSynonym ?englishLabelStr . }" class="exampleQuery">PREFIX oboInOwl: <http://www.geneontology.org/formats/oboInOwl#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> SELECT * WHERE { SERVICE <https://data.allie.dbcls.jp/sparql>{ ?x rdfs:label "1,2,4-トリクロロベンゼン"@ja ; rdfs:label ?englishLabel . FILTER(lang(?englishLabel) = "en") } BIND(STR(?englishLabel) AS ?englishLabelStr) ?chebi rdfs:label|oboInOwl:hasSynonym ?englishLabelStr . }</a></li><li>Select all Rhea reactions<a href="/sparql/?queryPREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX rh: <http://rdf.rhea-db.org/> # Query 1 # Select all Rhea reactions (unspecified direction) # and return identifier (id), accession, boolean attributes (isChemicallyBalanced, isTransport) and chemical equation. # SELECT ?rhea ?id ?accession ?isChemicallyBalanced ?isTransport ?equation WHERE { ?rhea rdfs:subClassOf rh:Reaction . ?rhea rh:id ?id . ?rhea rh:accession ?accession . ?rhea rh:equation ?equation . ?rhea rh:isTransport ?isTransport . ?rhea rh:isChemicallyBalanced ?isChemicallyBalanced . }" class="exampleQuery">PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX rh: <http://rdf.rhea-db.org/> # Query 1 # Select all Rhea reactions (unspecified direction) # and return identifier (id), accession, boolean attributes (isChemicallyBalanced, isTransport) and chemical equation. # SELECT ?rhea ?id ?accession ?isChemicallyBalanced ?isTransport ?equation WHERE { ?rhea rdfs:subClassOf rh:Reaction . ?rhea rh:id ?id . ?rhea rh:accession ?accession . ?rhea rh:equation ?equation . ?rhea rh:isTransport ?isTransport . ?rhea rh:isChemicallyBalanced ?isChemicallyBalanced . }</a></li><li>Select all Rhea reactions annotated with a given Pubmed ID<a href="/sparql/?queryPREFIX pubmed: <http://rdf.ncbi.nlm.nih.gov/pubmed/> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX rh: <http://rdf.rhea-db.org/> # Query 2 # Select all Rhea reactions annotated with a given Pubmed identifier (PMID = 29867142) # SELECT ?pubmed ?rhea ?accession ?isTransport ?equation WHERE { ?rhea rdfs:subClassOf rh:Reaction . ?rhea rh:accession ?accession . ?rhea rh:citation ?pubmed . VALUES (?pubmed) { (pubmed:29867142) } ?rhea rh:isTransport ?isTransport . ?rhea rh:equation ?equation . } ORDER BY ?rhea" class="exampleQuery">PREFIX pubmed: <http://rdf.ncbi.nlm.nih.gov/pubmed/> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX rh: <http://rdf.rhea-db.org/> # Query 2 # Select all Rhea reactions annotated with a given Pubmed identifier (PMID = 29867142) # SELECT ?pubmed ?rhea ?accession ?isTransport ?equation WHERE { ?rhea rdfs:subClassOf rh:Reaction . ?rhea rh:accession ?accession . ?rhea rh:citation ?pubmed . VALUES (?pubmed) { (pubmed:29867142) } ?rhea rh:isTransport ?isTransport . ?rhea rh:equation ?equation . } ORDER BY ?rhea</a></li><li>Select the specific form of <a href="https://www.rhea-db.org/rhea/11628">RHEA:11628</a>, a reaction that deals with general chemical classes (i.e. select the equivalent reactions involving instances of the chemical classes in <a href="https://www.rhea-db.org/rhea/11628">RHEA:11628</a><a href="/sparql/?queryPREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX rh: <http://rdf.rhea-db.org/> # Query 3 # Select the specific form of RHEA:11628. # This query mimics the Related reactions sections of # https://www.rhea-db.org/rhea/11628 # SELECT ?rhea ?equation ?childrenRhea ?childrenEquation WHERE { VALUES (?rhea) {(rh:11628)} ?rhea rh:equation ?equation . ?childrenRhea rdfs:subClassOf+ ?rhea . ?childrenRhea rh:equation ?childrenEquation . }" class="exampleQuery">PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX rh: <http://rdf.rhea-db.org/> # Query 3 # Select the specific form of RHEA:11628. # This query mimics the Related reactions sections of # https://www.rhea-db.org/rhea/11628 # SELECT ?rhea ?equation ?childrenRhea ?childrenEquation WHERE { VALUES (?rhea) {(rh:11628)} ?rhea rh:equation ?equation . ?childrenRhea rdfs:subClassOf+ ?rhea . ?childrenRhea rh:equation ?childrenEquation . }</a></li><li>Select all cross-references for a given reaction<a href="/sparql/?queryPREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX rh: <http://rdf.rhea-db.org/> # Query 4 # Select all cross-references mapped to RHEA:21016 # # This query mimics the Cross-references section of # https://www.rhea-db.org/rhea/21016 # SELECT distinct ?rhea ?rheaDir ?xref WHERE { ?rhea rdfs:subClassOf rh:Reaction . VALUES (?rhea) {(rh:21016)} { ?rhea rdfs:seeAlso ?xref . BIND(?rhea as ?rheaDir) } UNION { ?rhea rh:directionalReaction ?directionalReaction . ?directionalReaction rdfs:seeAlso ?xref . BIND(?directionalReaction as ?rheaDir ) } UNION { ?rhea rh:bidirectionalReaction ?bidirectionalReaction . ?bidirectionalReaction rdfs:seeAlso ?xref . BIND(?bidirectionalReaction as ?rheaDir ) } }" class="exampleQuery">PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX rh: <http://rdf.rhea-db.org/> # Query 4 # Select all cross-references mapped to RHEA:21016 # # This query mimics the Cross-references section of # https://www.rhea-db.org/rhea/21016 # SELECT distinct ?rhea ?rheaDir ?xref WHERE { ?rhea rdfs:subClassOf rh:Reaction . VALUES (?rhea) {(rh:21016)} { ?rhea rdfs:seeAlso ?xref . BIND(?rhea as ?rheaDir) } UNION { ?rhea rh:directionalReaction ?directionalReaction . ?directionalReaction rdfs:seeAlso ?xref . BIND(?directionalReaction as ?rheaDir ) } UNION { ?rhea rh:bidirectionalReaction ?bidirectionalReaction . ?bidirectionalReaction rdfs:seeAlso ?xref . BIND(?bidirectionalReaction as ?rheaDir ) } }</a></li><li>Select all Rhea reactions mapped to KEGG reactions<a href="/sparql/?queryPREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX rh: <http://rdf.rhea-db.org/> # Query 5 # Select all Rhea reactions mapped to KEGG reactions # KEGG reactions are mapped to Rhea bidirectional reactions # Rhea web query: https://www.rhea-db.org/rhea?query=kegg:* # SELECT ?rhea ?kegg ?rheaDir WHERE { ?rhea rdfs:subClassOf rh:Reaction . ?rhea rh:bidirectionalReaction ?rheaDir . ?rheaDir rdfs:seeAlso ?kegg . FILTER (regex(str(?kegg),'kegg')) }" class="exampleQuery">PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX rh: <http://rdf.rhea-db.org/> # Query 5 # Select all Rhea reactions mapped to KEGG reactions # KEGG reactions are mapped to Rhea bidirectional reactions # Rhea web query: https://www.rhea-db.org/rhea?query=kegg:* # SELECT ?rhea ?kegg ?rheaDir WHERE { ?rhea rdfs:subClassOf rh:Reaction . ?rhea rh:bidirectionalReaction ?rheaDir . ?rheaDir rdfs:seeAlso ?kegg . FILTER (regex(str(?kegg),'kegg')) }</a></li><li>Select all Rhea reactions mapped to MetaCyc reactions<a href="/sparql/?queryPREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX rh: <http://rdf.rhea-db.org/> # Query 6 # Select all Rhea reactions mapped to MetaCyc reactions # MetaCyc reactions are mapped to either undirected, left-to-right, right-to-left or bidirectional reactions # Rhea web query: https://www.rhea-db.org/rhea?query=metacyc:* # SELECT distinct ?rhea ?rheaDir ?metacyc WHERE { ?rhea rdfs:subClassOf rh:Reaction . { ?rhea rdfs:seeAlso ?metacyc . FILTER CONTAINS(str(?metacyc), "METACYC") BIND(?rhea as ?rheaDir) } UNION { ?rhea rh:directionalReaction ?directionalReaction . ?directionalReaction rdfs:seeAlso ?metacyc . FILTER CONTAINS(str(?metacyc), "METACYC") BIND(?directionalReaction as ?rheaDir ) } UNION { ?rhea rh:bidirectionalReaction ?bidirectionalReaction . ?bidirectionalReaction rdfs:seeAlso ?metacyc . FILTER CONTAINS(str(?metacyc), "METACYC") BIND(?bidirectionalReaction as ?rheaDir ) } }" class="exampleQuery">PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX rh: <http://rdf.rhea-db.org/> # Query 6 # Select all Rhea reactions mapped to MetaCyc reactions # MetaCyc reactions are mapped to either undirected, left-to-right, right-to-left or bidirectional reactions # Rhea web query: https://www.rhea-db.org/rhea?query=metacyc:* # SELECT distinct ?rhea ?rheaDir ?metacyc WHERE { ?rhea rdfs:subClassOf rh:Reaction . { ?rhea rdfs:seeAlso ?metacyc . FILTER CONTAINS(str(?metacyc), "METACYC") BIND(?rhea as ?rheaDir) } UNION { ?rhea rh:directionalReaction ?directionalReaction . ?directionalReaction rdfs:seeAlso ?metacyc . FILTER CONTAINS(str(?metacyc), "METACYC") BIND(?directionalReaction as ?rheaDir ) } UNION { ?rhea rh:bidirectionalReaction ?bidirectionalReaction . ?bidirectionalReaction rdfs:seeAlso ?metacyc . FILTER CONTAINS(str(?metacyc), "METACYC") BIND(?bidirectionalReaction as ?rheaDir ) } }</a></li><li>Select all Rhea reactions mapped to Reactome reactions<a href="/sparql/?queryPREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX rh: <http://rdf.rhea-db.org/> # Query 7 # Select all Rhea reactions mapped to Reactome reactions # MetaCyc reactions are mapped to either undirected, left-to-right or right-to-left reactions # Rhea web query: https://www.rhea-db.org/rhea?query=reactome:* # SELECT distinct ?rhea ?rheaDir ?reactome WHERE { ?rhea rdfs:subClassOf rh:Reaction . { ?rhea rdfs:seeAlso ?reactome . FILTER CONTAINS(str(?reactome), "reactome") BIND(?rhea as ?rheaDir) } UNION { ?rhea rh:directionalReaction ?directionalReaction . ?directionalReaction rdfs:seeAlso ?reactome . FILTER CONTAINS(str(?reactome), "reactome") BIND(?directionalReaction as ?rheaDir ) } }" class="exampleQuery">PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX rh: <http://rdf.rhea-db.org/> # Query 7 # Select all Rhea reactions mapped to Reactome reactions # MetaCyc reactions are mapped to either undirected, left-to-right or right-to-left reactions # Rhea web query: https://www.rhea-db.org/rhea?query=reactome:* # SELECT distinct ?rhea ?rheaDir ?reactome WHERE { ?rhea rdfs:subClassOf rh:Reaction . { ?rhea rdfs:seeAlso ?reactome . FILTER CONTAINS(str(?reactome), "reactome") BIND(?rhea as ?rheaDir) } UNION { ?rhea rh:directionalReaction ?directionalReaction . ?directionalReaction rdfs:seeAlso ?reactome . FILTER CONTAINS(str(?reactome), "reactome") BIND(?directionalReaction as ?rheaDir ) } }</a></li><li>Select all Rhea reactions mapped to GO molecular functions<a href="/sparql/?queryPREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX rh: <http://rdf.rhea-db.org/> # Query 8 # Select all Rhea reactions mapped to GO molecular function # # This query corresponds to the Rhea website query: # https://www.rhea-db.org/rhea?query=go:* # SELECT ?go ?rhea ?equation WHERE { ?rhea rdfs:subClassOf rh:Reaction . ?rhea rdfs:seeAlso ?go . FILTER CONTAINS(str(?go), "GO_") ?rhea rh:equation ?equation . }" class="exampleQuery">PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX rh: <http://rdf.rhea-db.org/> # Query 8 # Select all Rhea reactions mapped to GO molecular function # # This query corresponds to the Rhea website query: # https://www.rhea-db.org/rhea?query=go:* # SELECT ?go ?rhea ?equation WHERE { ?rhea rdfs:subClassOf rh:Reaction . ?rhea rdfs:seeAlso ?go . FILTER CONTAINS(str(?go), "GO_") ?rhea rh:equation ?equation . }</a></li><li>Select all Rhea reactions mapped to enzyme classification (EC numbers)<a href="/sparql/?queryPREFIX ec: <http://purl.uniprot.org/enzyme/> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX rh: <http://rdf.rhea-db.org/> # Query 9 # Select all Rhea reactions mapped to EC numbers (enzyme classification) # # This query corresponds to the Rhea website query: # https://www.rhea-db.org/rhea?query=ec:* # SELECT ?ec ?ecNumber ?rhea ?accession ?equation WHERE { ?rhea rdfs:subClassOf rh:Reaction . ?rhea rh:accession ?accession . ?rhea rh:ec ?ec . BIND(strafter(str(?ec),str(ec:)) as ?ecNumber) ?rhea rh:isTransport ?isTransport . ?rhea rh:equation ?equation . }" class="exampleQuery">PREFIX ec: <http://purl.uniprot.org/enzyme/> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX rh: <http://rdf.rhea-db.org/> # Query 9 # Select all Rhea reactions mapped to EC numbers (enzyme classification) # # This query corresponds to the Rhea website query: # https://www.rhea-db.org/rhea?query=ec:* # SELECT ?ec ?ecNumber ?rhea ?accession ?equation WHERE { ?rhea rdfs:subClassOf rh:Reaction . ?rhea rh:accession ?accession . ?rhea rh:ec ?ec . BIND(strafter(str(?ec),str(ec:)) as ?ecNumber) ?rhea rh:isTransport ?isTransport . ?rhea rh:equation ?equation . }</a></li><li>Select all Rhea reactions linked to an enzyme classification (sub)-class<a href="/sparql/?queryPREFIX ec: <http://purl.uniprot.org/enzyme/> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX rh: <http://rdf.rhea-db.org/> # Query 10 # Select all Rhea reactions mapped to # # This query corresponds to the Rhea website query: # https://www.rhea-db.org/rhea?query=ec:1.* # https://www.rhea-db.org/rhea?query=ec:1.1.* # https://www.rhea-db.org/rhea?query=ec:1.1.1.* # SELECT ?ec ?ecNumber ?rhea ?accession ?equation WHERE { ?rhea rdfs:subClassOf rh:Reaction . ?rhea rh:accession ?accession . ?rhea rh:ec ?ec . BIND(strafter(str(?ec),str(ec:)) as ?ecNumber) # class (e.g EC 1.-.-.-) FILTER (regex(?ecNumber,'^1\\.')) # sub-class (e.g EC 1.1.-.-) #FILTER (regex(?ecNumber,'^1\\.1\\.')) # sub-sub-class (e.g EC 1.1.1.-) #FILTER (regex(?ecNumber,'^1\\.1\\.1\\.')) ?rhea rh:equation ?equation . }" class="exampleQuery">PREFIX ec: <http://purl.uniprot.org/enzyme/> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX rh: <http://rdf.rhea-db.org/> # Query 10 # Select all Rhea reactions mapped to # # This query corresponds to the Rhea website query: # https://www.rhea-db.org/rhea?query=ec:1.* # https://www.rhea-db.org/rhea?query=ec:1.1.* # https://www.rhea-db.org/rhea?query=ec:1.1.1.* # SELECT ?ec ?ecNumber ?rhea ?accession ?equation WHERE { ?rhea rdfs:subClassOf rh:Reaction . ?rhea rh:accession ?accession . ?rhea rh:ec ?ec . BIND(strafter(str(?ec),str(ec:)) as ?ecNumber) # class (e.g EC 1.-.-.-) FILTER (regex(?ecNumber,'^1\\.')) # sub-class (e.g EC 1.1.-.-) #FILTER (regex(?ecNumber,'^1\\.1\\.')) # sub-sub-class (e.g EC 1.1.1.-) #FILTER (regex(?ecNumber,'^1\\.1\\.1\\.')) ?rhea rh:equation ?equation . }</a></li><li>Distribution of reactions according to the first class of the enzyme classification (federated query)<a href="/sparql/?queryPREFIX ec: <http://purl.uniprot.org/enzyme/> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX rh: <http://rdf.rhea-db.org/> PREFIX skos: <http://www.w3.org/2004/02/skos/core#> # Query 11 # Retrieve the count of reactions mapped to each level (main class) of the enzyme classification # # This query mimics the Filter section of the Rhea website (Browse all reactions) # https://www.rhea-db.org/rhea?query= SELECT ?ecClass (STR(?ecName) AS ?ecClassName) (COUNT(?rhea) AS ?rheaCount) WHERE { SERVICE <https://sparql.uniprot.org/sparql> { VALUES (?ecClass) { (ec:1.-.-.-)(ec:2.-.-.-)(ec:3.-.-.-)(ec:4.-.-.-)(ec:5.-.-.-) (ec:6.-.-.-) (ec:7.-.-.-)} ?ecNumber rdfs:subClassOf ?ecClass . ?ecClass skos:prefLabel ?ecName . } ?rhea rdfs:subClassOf rh:Reaction . ?rhea rh:ec ?ecNumber . } GROUP BY ?ecClass ?ecName" class="exampleQuery">PREFIX ec: <http://purl.uniprot.org/enzyme/> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX rh: <http://rdf.rhea-db.org/> PREFIX skos: <http://www.w3.org/2004/02/skos/core#> # Query 11 # Retrieve the count of reactions mapped to each level (main class) of the enzyme classification # # This query mimics the Filter section of the Rhea website (Browse all reactions) # https://www.rhea-db.org/rhea?query= SELECT ?ecClass (STR(?ecName) AS ?ecClassName) (COUNT(?rhea) AS ?rheaCount) WHERE { SERVICE <https://sparql.uniprot.org/sparql> { VALUES (?ecClass) { (ec:1.-.-.-)(ec:2.-.-.-)(ec:3.-.-.-)(ec:4.-.-.-)(ec:5.-.-.-) (ec:6.-.-.-) (ec:7.-.-.-)} ?ecNumber rdfs:subClassOf ?ecClass . ?ecClass skos:prefLabel ?ecName . } ?rhea rdfs:subClassOf rh:Reaction . ?rhea rh:ec ?ecNumber . } GROUP BY ?ecClass ?ecName</a></li><li>Select all Rhea reactions linked to protein sequences (enzymes and transporters) in UniProtKB<a href="/sparql/?queryPREFIX rh: <http://rdf.rhea-db.org/> PREFIX up: <http://purl.uniprot.org/core/> # Query 12 # Select all Rhea reactions used to annotate enzyme sequences in UniProtKB # return the number of UniProtKB entries # Federated query using a service to UniProt SPARQL endpoint # # This query corresponds to the Rhea website query: # https://www.rhea-db.org/rhea?query=uniprot:* # SELECT ?uniprotCount ?rhea ?accession ?equation WHERE { SERVICE <https://sparql.uniprot.org/sparql> { SELECT ?rhea (count(?uniprot) as ?uniprotCount) { ?uniprot up:annotation/up:catalyticActivity/up:catalyzedReaction ?rhea . } GROUP BY ?rhea } ?rhea rh:accession ?accession . ?rhea rh:equation ?equation . }" class="exampleQuery">PREFIX rh: <http://rdf.rhea-db.org/> PREFIX up: <http://purl.uniprot.org/core/> # Query 12 # Select all Rhea reactions used to annotate enzyme sequences in UniProtKB # return the number of UniProtKB entries # Federated query using a service to UniProt SPARQL endpoint # # This query corresponds to the Rhea website query: # https://www.rhea-db.org/rhea?query=uniprot:* # SELECT ?uniprotCount ?rhea ?accession ?equation WHERE { SERVICE <https://sparql.uniprot.org/sparql> { SELECT ?rhea (count(?uniprot) as ?uniprotCount) { ?uniprot up:annotation/up:catalyticActivity/up:catalyzedReaction ?rhea . } GROUP BY ?rhea } ?rhea rh:accession ?accession . ?rhea rh:equation ?equation . }</a></li><li>Select all Rhea reactions used in UniProtKB/Swiss-Prot for a given organism (NCBI taxonomy ID).<a href="/sparql/?queryPREFIX rh: <http://rdf.rhea-db.org/> PREFIX taxon: <http://purl.uniprot.org/taxonomy/> PREFIX up: <http://purl.uniprot.org/core/> # Query 13 # Select all Rhea reactions used to annotate Escherichia coli (taxid=83333) in UniProtKB/Swiss-Prot # return the number of UniProtKB entries # # Federated query using a service to UniProt SPARQL endpoint # # This query cannot be performed using the Rhea search website SELECT ?uniprot ?mnemo ?rhea ?accession ?equation WHERE { SERVICE <https://sparql.uniprot.org/sparql> { VALUES (?taxid) { (taxon:83333) } GRAPH <http://sparql.uniprot.org/uniprot> { ?uniprot up:reviewed true . ?uniprot up:mnemonic ?mnemo . ?uniprot up:organism ?taxid . ?uniprot up:annotation/up:catalyticActivity/up:catalyzedReaction ?rhea . } } ?rhea rh:accession ?accession . ?rhea rh:equation ?equation . }" class="exampleQuery">PREFIX rh: <http://rdf.rhea-db.org/> PREFIX taxon: <http://purl.uniprot.org/taxonomy/> PREFIX up: <http://purl.uniprot.org/core/> # Query 13 # Select all Rhea reactions used to annotate Escherichia coli (taxid=83333) in UniProtKB/Swiss-Prot # return the number of UniProtKB entries # # Federated query using a service to UniProt SPARQL endpoint # # This query cannot be performed using the Rhea search website SELECT ?uniprot ?mnemo ?rhea ?accession ?equation WHERE { SERVICE <https://sparql.uniprot.org/sparql> { VALUES (?taxid) { (taxon:83333) } GRAPH <http://sparql.uniprot.org/uniprot> { ?uniprot up:reviewed true . ?uniprot up:mnemonic ?mnemo . ?uniprot up:organism ?taxid . ?uniprot up:annotation/up:catalyticActivity/up:catalyzedReaction ?rhea . } } ?rhea rh:accession ?accession . ?rhea rh:equation ?equation . }</a></li><li><a href="/.well-known/sparql-examples/?offset=15">More examples</a></li></ol></section><section id="sparql-area"><h3><label for="query">Your SPARQL query</label></h3><form method="get" action="/sparql/" name="sparql-form" id="sparql-form"><button id="addPrefix" type="button">Add common prefixes</button><textarea accesskey="1" rows="10" cols="80" name="query" id="query"></textarea><input type="hidden" name="format" value="html"><button id="sparqlFormSubmitter" type="submit">Submit Query</button></form></section><section class="shortcuts transparent" id="news-container"><div id="news"></div></section><section id="about-area"><h4>About</h4><p>This SPARQL endpoint contains Rhea reactions data (see <a href="https://www.rhea-db.org/statistics">statistics</a>), and a snapshot of ChEBI data matching the Rhea release. It is free to access and supports the SPARQL 1.1 Standard. </p><p>There are 5,322,105 triples in this release (2025_01). The query timeout is 45 minutes. All triples are available in the default graph. There are two named graphs: <a href="http://sparql.rhea-db.org/rhea">Rhea</a> and <a href="http://sparql.rhea-db.org/chebi"> ChEBI</a>. </p><h4>Documentation</h4><ol><li><a href="/.well-known/void">Statistics</a> and <a href="https://ftp.expasy.org/databases/rhea/rdf/rhea_rdf_documentation.pdf">diagrams</a></li><li><a href="https://github.com/sib-swiss/sparql-training/tree/master/rhea">Tutorial on using SPARQL with Rhea</a></li><li><a href="/.well-known/sparql-examples/">Example queries</a></li><li><a href="https://www.rhea-db.org/statistics">Release data</a></li></ol></section></main><footer><a href="https://www.sib.swiss" target="_blank"><img src="https://www.rhea-db.org//style/images/sib_logo_short.png" alt="Supported by SIB"/></a><div id="fund"> This SPARQL endpoint is hosted by the <a href="https://www.sib.swiss/alan-bridge-group/" target="_blank">SIB Swiss Institute of Bioinformatics</a>, and uses <a href="https://rdf4j.org/" target="_blank">Eclipse rdf4j</a> software.<br/>Rhea development and curation activities at the SIB are supported by the Swiss Federal Government through the State Secretariat for Education, Research and Innovation (SERI).<br/> The development of this SPARQL endpoint was supported in part by ELIXIR (Implementation study on "<a href="https://www.elixir-europe.org/platforms/data/microbial-metabolism-resource" target="_blank">A microbial metabolism resource for Systems Biology</a>"). </div><div id="legal"><a href="https://www.rhea-db.org/help/license-disclaimer">License & Disclaimer</a> | <a href="https://www.sib.swiss/privacy-policy-2018">Privacy Notice</a></div></footer><script src="/sparql.js" type="text/javascript"> </script></body></html>