Get KEGG database, with caching.
Details
The valid KEGG database names are:
kegg | pathway | brite | module | ko | genes |
Examples
# Saving in path
data_dir <- tempdir()
kegg_compounds <- get_kegg_db(
db_name = "compound",
path = data_dir, verbose = TRUE
)
#> Retrieving KEGG database: compound
#> Downloaded & saved KEGG database in: /tmp/RtmpkwIYXN/kegg_compound.tsv
# Just returning without saving
kegg_compounds_onthefly <- get_kegg_db(
db_name = "compound",
verbose = TRUE
)
#> Retrieving KEGG database: compound
#> No 'bfc' or 'path' provided.
head(kegg_compounds_onthefly)
#> kegg_id
#> 1 C00001
#> 2 C00002
#> 3 C00003
#> 4 C00004
#> 5 C00005
#> 6 C00006
#> description
#> 1 H2O; Water
#> 2 ATP; Adenosine 5'-triphosphate
#> 3 NAD+; NAD; Nicotinamide adenine dinucleotide; DPN; Diphosphopyridine nucleotide; Nadide; beta-NAD+
#> 4 NADH; DPNH; Reduced nicotinamide adenine dinucleotide
#> 5 NADPH; TPNH; Reduced nicotinamide adenine dinucleotide phosphate
#> 6 NADP+; NADP; Nicotinamide adenine dinucleotide phosphate; beta-Nicotinamide adenine dinucleotide phosphate; TPN; Triphosphopyridine nucleotide; beta-NADP+
# saving to cache (in a temp dir)
kegg_compounds_cached <- get_kegg_db(
db_name = "compound",
bfc = BiocFileCache::BiocFileCache(tempdir()),
verbose = TRUE
)
#> Retrieving KEGG database: compound
#> adding rname 'https://rest.kegg.jp/list/compound'
#>
#> Cached KEGG database: compound