Rhea REST API
Content:
- Introduction
- REST URL syntax
- Rhea website examples
- Retrieve Rhea reaction identifiers and equation text
- Retrieve Rhea reactions that have enzymes curated in UniProtKB
- UniProt website examples
- Retrieve UniProtKB/Swiss-Prot entries with curated Rhea reactions
- Retrieve UniProtKB/Swiss-Prot sequences annotated with RHEA:10020
- Related documents
Introduction
The Rhea website has RESTful URLs that can be bookmarked, linked and used in programs for all entries, queries and tools available through the website. The data is available in all formats provided on the website, i.e. individual reactions in RXN and RD formats and search result tables in customizable tab-separated values format.
Please consider to provide a contact email address as part of the User-Agent header that your programs set. This will allow us to contact you in case of problems (see our privacy notice).
REST URL syntax
Entries
The URL for an individual entry consists of the dataset name rhea
, the entry's unique identifier (without prefix) and the format
type, e.g.
https://www.rhea-db.org/rhea/10661.rxn
https://www.rhea-db.org/rhea/10661.rd
Please note that the MDL CT file formats RXN and RD represent only unidirectional processes. For this reason, bidirectional reactions and reactions with undefined directions cannot be described in these formats.
Tables
The URL for a query result consists of the dataset name rhea
and the actual query. The following query parameters are supported:
Parameter | Values | Description |
---|---|---|
query | string | Query string. An empty query string will retrieve all entries in a data set. |
columns | comma-separated list of column names | Columns to include in result. |
format | tsv | Result format: tsv returns data for the selected columns as tab-separated values. |
limit | integer | Maximum number of results to retrieve. |
The easiest way to compose your query
string and columns
list is to try the query interactively and then click the 'Share' icon to get the base URL to which you can then add the format
parameter.
Column names
Column label | Column ID | Value |
---|---|---|
Reaction identifier | rhea-id | reaction identifier (with prefix RHEA ) |
Equation | equation | textual description of the reaction equation |
ChEBI name | chebi | semicolon-separated list of ChEBI names used as reaction participants |
ChEBI identifier | chebi-id | semicolon-separated list of ChEBI identifiers used as reaction participants |
EC number | ec | semicolon-separated list of EC numbers (with prefix EC ) |
Enzymes | uniprot | number of proteins (UniProtKB entries) annotated with the Rhea reaction |
Gene Ontology | go | GO identifier (with prefix GO ) and label |
PubMed | pubmed | semicolon-separated list of PubMed identifiers (without prefix) |
Cross-reference (EcoCyc) | reaction-xref(EcoCyc) | |
Cross-reference (MetaCyc) | reaction-xref(MetaCyc) | |
Cross-reference (KEGG) | reaction-xref(KEGG) | |
Cross-reference (Reactome) | reaction-xref(Reactome) | |
Cross-reference (N-CSA/MACiE) | reaction-xref(M-CSA) |
Rhea website examples
For testing you can use the limit=
field to retrieve only a small number of records.
Retrieve Rhea reaction identifiers and equation text
URL
curl "https://www.rhea-db.org/rhea/?query=&columns=rhea-id,equation&format=tsv&limit=10" -o test.tsv
Python 3
import requests url= "https://www.rhea-db.org/rhea?" parameter = { "query":'', "columns":"rhea-id,equation", "format":'tsv', "limit":10, } response = requests.get(url,params=parameter)
Retrieve Rhea reactions that have enzymes curated in UniProtKB
URL
curl "https://www.rhea-db.org/rhea/?query=uniprot:*&columns=rhea-id,equation,uniprot&format=tsv&limit=10" -o test.tsv
Python 3
import requests url= "https://www.rhea-db.org/rhea?" parameter = { "query":'uniprot:*', "columns":"rhea-id,equation,uniprot", "format":'tsv', "limit":10, } response = requests.get(url,params=parameter)
UniProt website examples
- The
reviewed:true
condition limits the search to the UniProtKB/Swiss-Prot section. - The
fragment:false
condition excludes proteins for which only a part of their sequence is known.
Retrieve UniProtKB/Swiss-Prot entries with curated Rhea reactions
URL
curl "https://rest.uniprot.org/uniprotkb/search?fields=accession,rhea&format=tsv&query=((cc_catalytic_activity:"rhea:*") AND (fragment:false) AND (reviewed:true))&size=10" -o test.tab
Python 3
import requests url= "https://rest.uniprot.org/uniprotkb/search?" parameter = { "query":'((cc_catalytic_activity:"rhea:*") AND (fragment:false) AND (reviewed:true))', "fields":"accession,rhea", "format":'tsv', "size":10, } response = requests.get(url,params=parameter)
Please note that the UniProt REST service may return more than one Rhea identifier per UniProt entry, including identifiers of undefined and directional (LR, RL) reactions. Multiple values are separated by space.
Retrieve UniProtKB/Swiss-Prot sequences annotated with RHEA:10020
URL
curl "https://rest.uniprot.org/uniprotkb/search?format=fasta&query=((cc_catalytic_activity:"rhea:10020") AND (fragment:false) AND (reviewed:true))" -o uniprot_rhea_10020.fasta
Python 3
import requests url= "https://rest.uniprot.org/uniprotkb/search?" parameter = { "query":'((cc_catalytic_activity:"rhea:10020") AND (fragment:false) AND (reviewed:true))', "format":'fasta', } response = requests.get(url,params=parameter)