Run FELLA
for metabolomics enrichment in KEGG pathways.
Return results in a format similar to gprofiler2::gost()
results.
Arguments
- input
character vector, input features (KEGG IDs)
- background
character vector, background features (KEGG IDs)
- fella.data
FELLA
database returned byFELLA::loadKEGGdata()
- method
character,
FELLA
enrichment method, one of "hypergeom", "diffusion"- niter
integer, number of iterations with which to estimate p-values by simulation. Only applies for the diffusion method of enrichment.
Value
data table of pathway enrichment results:
term_size
double, number of KEGG IDs that are annotated to the term
query_size
integer, number of KEGG IDs that were included in the query
intersection_size
double, the number of KEGG IDs in the input query that are annotated to the corresponding term
term_id
character, unique term/pathway identifier
source
character, database source of term/pathway
computed_p_value
double, nominal enrichment p-value
kegg_id
character, KEGG ID for
term_id
Examples
if (FALSE) { # \dontrun{
# Make KEGG database
kegg_db = "~/KEGGdb/test"
make_kegg_db(kegg_db)
# Get FELLA data
fella.data = FELLA::loadKEGGdata(databaseDir = kegg_db,
internalDir = FALSE,
loadMatrix = c("hypergeom","diffusion"))
# Get input features
# Metabolites in SKM-GN:8w_F1_M1 that map to a KEGG ID
input = c("C02918","C00195","C01967","C00016","C04438","C02294","C00003","C00006",
"C00157","C00350","C04475","C00344","C06125","C00550","C00387","C04230",
"C00073","C00864","C00670","C00836","C00319")
# Get universe/background list
background = MotrpacRatTraining6moData::GENE_UNIVERSES$gene_symbol$METAB$`SKM-GN`
# Example 1: method "hypergeom"
res = run_fella(input, background, fella.data, method="hypergeom")
# Example 2: method "diffusion" (more powerful but slower and more difficult to interpret)
res = run_fella(input, background, fella.data, method="diffusion")
} # }