Title: | The BRENDA Enzyme Database |
---|---|
Description: | R interface for importing and analyzing enzyme information from the BRENDA database. |
Authors: | Yi Zhou [aut, cre] |
Maintainer: | Yi Zhou <[email protected]> |
License: | MIT + file LICENSE |
Version: | 1.21.0 |
Built: | 2024-11-23 06:05:59 UTC |
Source: | https://github.com/bioc/brendaDb |
brendaDb provides an R interface to download, clean and extract enzyme information from the BRENDA database.
The main aims of brendaDb include:
Read text file downloaded from BRENDA into an R tibble
Retrieve information for specific enzymes
Query enzymes using their synonyms, gene symbols, etc.
Query enzyme information for specific BioCyc pathways
To learn more about brendaDb, please refer to the vignette.
browseVignettes(package = "brendaDb")
Maintainer: Yi Zhou [email protected] (ORCID)
Useful links:
By default, the function downloads a zipped BRENDA text file to
a local cache directory, and extracts a brenda_download.txt
file.
DownloadBrenda(force.download = FALSE)
DownloadBrenda(force.download = FALSE)
force.download |
Boolean value. If TRUE, ignore the cache and force re-download of the BRENDA text file. Default is FALSE. |
A string of the path to the downloaded BRENDA text file.
## Not run: DownloadBrenda()
## Not run: DownloadBrenda()
Retrieve one field from all the brenda.entry objects. A column of EC numbers will be added to distinguish different enzymes.
ExtractField(res, field, entries = NULL)
ExtractField(res, field, entries = NULL)
res |
A brenda.entries object from |
field |
A string indicating the field to extract. Nested fields should
be separated by |
entries |
A character vector with values of EC numbers. This should be a
subset of |
A tibble with all columns from the tibble in the given field, and extra columns containing the EC numbers and organisms.
df <- ReadBrenda(system.file("extdata", "brenda_download_test.txt", package = "brendaDb")) res <- QueryBrenda(brenda = df, EC = c("1.1.1.1", "6.3.5.8"), n.core = 2) ExtractField(res, field = "molecular$stability$general.stability") ExtractField(res, field = "structure$subunits")
df <- ReadBrenda(system.file("extdata", "brenda_download_test.txt", package = "brendaDb")) res <- QueryBrenda(brenda = df, EC = c("1.1.1.1", "6.3.5.8"), n.core = 2) ExtractField(res, field = "molecular$stability$general.stability") ExtractField(res, field = "structure$subunits")
A helper function for converting names/synonyms to EC numbers.
ID2Enzyme(brenda, ids)
ID2Enzyme(brenda, ids)
brenda |
A |
ids |
A character vector of IDs to be converted. |
The function goes through "RECOMMENDED_NAME", "SYSTEMATIC_NAME", and
"SYNONYMS" in the BRENDA file, and uses regexes to look for the given IDs.
Values in the three columns are kept if the regex had a hit, otherwise NA is
filled. The function can take in IDs of multiple sources, e.g. c("ADH4", "CD38", "pyruvate dehydrogenase")
. Note that using aliases instead of
symbols could lead to false positives in the output table.
A tibble with columns ID, EC, and at least one of (RECOMMENDED_NAME, SYSTEMATIC_NAME and SYNONYMS).
df <- ReadBrenda(system.file("extdata", "brenda_download_test.txt", package = "brendaDb")) ID2Enzyme(df, c("CD38", "ADH4", "pyruvate dehydrogenase"))
df <- ReadBrenda(system.file("extdata", "brenda_download_test.txt", package = "brendaDb")) ID2Enzyme(df, c("CD38", "ADH4", "pyruvate dehydrogenase"))
Show the number of regular and transferred/deleted brenda.entry objects in the brenda.entries list.
## S3 method for class 'brenda.entries' print(x, ..., verbose = FALSE)
## S3 method for class 'brenda.entries' print(x, ..., verbose = FALSE)
x |
A brenda.entries list returned by |
... |
Other arguments passed to the generic function. |
verbose |
Boolean; if TRUE, print tree views of brenda.query objects. |
Nothing; print summary information to the terminal.
For details, see PrettyPrintBrendaEntry()
.
## S3 method for class 'brenda.entry' print(x, full.output = FALSE, ...)
## S3 method for class 'brenda.entry' print(x, full.output = FALSE, ...)
x |
A brenda.entry object (elements in the list returned by the function
|
full.output |
A boolean default to FALSE. If TRUE, include all entries even if they are empty (NA or 0 rows). |
... |
Other arguments passed to the generic function. |
Nothing; print object information to the terminal.
Use a vector of EC numbers to retrieve information from the
BRENDA tibble
read in by ReadBrenda()
. Invalid EC numbers will be removed
and a message will be generated.
QueryBrenda(brenda, EC, n.core = 0, fields = FALSE, ...)
QueryBrenda(brenda, EC, n.core = 0, fields = FALSE, ...)
brenda |
A |
EC |
A string of the EC number. |
n.core |
Integer specifying the number of cores to use. Default is 0, which would result in using all available cores. |
fields |
A character vector indicating fields to parse. Default is FALSE, which would be returning all fields. |
... |
Other parameters passed to |
A list of brenda.entry
objects.
QueryBrendaBase()
ConfigBPCores()
SelectOrganism()
df <- ReadBrenda(system.file("extdata", "brenda_download_test.txt", package = "brendaDb")) res <- QueryBrenda(brenda = df, EC = c("1.1.1.1", "1.1.1.10", "6.3.5.8"), n.core = 2, organisms = "Homo sapiens")
df <- ReadBrenda(system.file("extdata", "brenda_download_test.txt", package = "brendaDb")) res <- QueryBrenda(brenda = df, EC = c("1.1.1.1", "1.1.1.10", "6.3.5.8"), n.core = 2, organisms = "Homo sapiens")
For each EC entry, split the annotations into three columns:
ID: EC number, e.g. 1.1.1.1
field: the content of the information, e.g. protein, localization
description: everything else
ReadBrenda(filepath, clean = TRUE)
ReadBrenda(filepath, clean = TRUE)
filepath |
A string indicating the path to the text file. |
clean |
Boolean; if TRUE, run |
A matrix containing information about the EC entries.
brenda_txt <- system.file("extdata", "brenda_download_test.txt", package = "brendaDb") df <- ReadBrenda(brenda_txt)
brenda_txt <- system.file("extdata", "brenda_download_test.txt", package = "brendaDb") df <- ReadBrenda(brenda_txt)
Read file into buffer, and load all non-empty lines. Comment lines (starting with *) are skipped. The text file should be downloaded from https://www.brenda-enzymes.org/download_brenda_without_registration.php
ReadBrendaFile(filepath)
ReadBrendaFile(filepath)
filepath |
A string indicating the path to the text file. |
A vector
For each EC entry, split the annotations into three columns:
ID: EC number, e.g. 1.1.1.1
field: the content of the information, e.g. protein, localization
description: everything else
SeparateEntries(lines)
SeparateEntries(lines)
lines |
The output vector |
A vector<vector
Show all unique BRENDA fields and their corresponding acronyms.
ShowFields(df)
ShowFields(df)
df |
A data.frame with columns "field" and "description" |
A data.frame with columns "field" and "acronym".
df <- ReadBrenda(system.file("extdata", "brenda_download_test.txt", package = "brendaDb")) ShowFields(df)
df <- ReadBrenda(system.file("extdata", "brenda_download_test.txt", package = "brendaDb")) ShowFields(df)