setlabel | R Documentation |
This function generates binary label matrix of metabolites and metabolite sets. This is mainly used to be called by other functions, and used to count the number of metabolites in a specific metabolite set.
setlabel(MET, M)
MET |
A character vector of metabolites (e.g., detected or significant metabolites). |
M |
A named list of metabolite sets, where each element is a character vector of metabolites. |
This function is used internally in various ORA methods (e.g., ora_det
, ora_all
, ora_est
) to compute contingency tables for enrichment analysis.
binary label matrix of metabolites in metabolite sets
Hiroyuki Yamamoto
# Example
data(fasting)
data(pathway)
MET <- colnames(fasting$X) # detected metabolites
M <- pathway$fasting # metabolite set list
# Fix for multiple annotations
MET[MET == "UDP-glucose ; UDP-galactose"] <- "UDP-glucose"
MET[MET == "trans-Glutaconic acid ; Itaconic acid"] <- "Itaconic acid"
MET[MET == "Isonicotinamide ; Nicotinamide"] <- "Nicotinamide"
MET[MET == "Isobutyric acid ; Butyric acid"] <- "Isobutyric acid"
MET[MET == "GDP-mannose ; GDP-galactose"] <- "GDP-mannose"
MET[MET == "ADP-glucose ; GDP-fucose"] <- "ADP-glucose"
MET[MET == "1-Methylhistidine ; 3-Methylhistidine"] <- "3-Methylhistidine"
L <- setlabel(MET, M)
# Example 2
data(fasting_mseapca)
MET <- fasting_mseapca$DET
M <- fasting_mseapca$pathway
L <- setlabel(MET, M)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.