fetch_kegg: Fetch KEGG data usig KEGG API

fetch_keggR Documentation

Fetch KEGG data usig KEGG API

Description

Fetch KEGG data usig KEGG API, for the purpose of finding out association with transcriptome and metabolome experimental data.

Usage

fetch_kegg_gene(org, outfmt, out_fst)

fetch_kegg_react(outfmt)

fetch_kegg_cpd(outfmt)

fetch_kegg_react(outfmt)

fetch_kegg_cpd(outfmt)

Arguments

org

character: KEGG organism id. If "all" , get a list of all organism for confirm a organim id.

outfmt

character: fetch_kegg_gene(outfmt=c("ntseq", "aaseq", "gene_id", "gene_map","gene_desc", or "pathway")) fetch_kegg_cpd(outfmt=c("cpd_map", or "cpd_desc") fetch_kegg_react(outfmt=c("reaction_entry", or "reaction_flat")) If "ntseq" or "aaseq" is chosen, the nucleotide or amino acid sequence in fasta format is written to "out_fst". On the other hand, if "gene_id" is selected, an ID correspondence table will be returned. In case of "fetch_kegg_react", select either "reaction_entry" or "reaction_flat". The "reaction_entry" retruns KEGG REACTION id and discription, which linked to KEGG PATHWAY. The "reaction_flat" gets all KEGG REACTION entries and returns the converted data frame. It takes too much time. Using "fetch_kegg_cpd", select an output format from one of these "cpd_map", "cpd_desc".

out_fst

character: out put file path of "fasta" format.

Details

Fetch KEGG data usig KEGG API

Value

If type is "gene_id" it will return a data frame and if it is "ntseq" or "aaseq" it will only write fasta to the "out_fst" file.

Examples

## Not run: 
# KEGG GENE
## confirm specific organism id
orgs <- fetch_kegg_gene(org = "all")

## create correspondance id table Mycoplasma genitalium G37
id_tab <- fetch_kegg_gene(org = "mge", outfmt = "gene_id")

## create links of k-number
kid_tab <- fetch_kegg_gene(org = "ko", outfmt = "gene_id")

## link between gene and map.
g_map <- fetch_kegg_gene("ko", "gene_map")

## list pathway
maps <- fetch_kegg_gene(org ="ko", outfmt = "pathway")

## get ntseq (It takes a long time)
fetch_kegg_gene(org="mge", outfmt="ntseq", out_fst="./mge.fna")

## get aaseq
fetch_kegg_gene(org="mge", outfmt="aaseq", out_fst="./mge.faa")

# KEGG REACTION
react <- fetch_kegg_react(outfmt="reaction_entry")
react_dat <- fetch_kegg_react(outfmt="reaction_flat")

# KEGG COMPOUND
cpd_desc <- fetch_kegg_cpd("cpd_desc")
cpd_map <- fetch_kegg_cpd("cpd_map")


## End(Not run)


shkonishi/rsko documentation built on Feb. 21, 2023, 5:12 a.m.