msea_ora {mseapca}R Documentation

Wrapper function for over-representation analysis (ORA)

Description

msea_ora is a wrapper function that calls ORA implementations, allowing the user to choose how undetected metabolites are handled.

Usage

msea_ora(SIG, DET, M, option = "det", lambda=NULL)

Arguments

SIG

Character vector of significant metabolites

DET

Character vector of detected metabolites. Required for all options except "all".

M

A named list, where each element is a metabolite set (e.g., pathway) containing character vectors of metabolites.

option

One of "det", "all", "est_naive", "est_weighted", or "est_shrink".

lambda

Shrinkage parameter used only when option = "est_shrink".

Value

A list with:

Result of MSEA(ORA)

Matrix of p-values and q-values

significant metabolites

List of significant metabolites per set

Contingency tables

A list of 2×2 contingency tables used in Fisher's exact tests.

Author(s)

Hiroyuki Yamamoto

References

Yamamoto H, Fujimori T, Sato H, Ishikawa G, Kami K, Ohashi Y, Statistical hypothesis testing of factor loading in principal component analysis and its application to metabolite set enrichment analysis. BMC Bioinformatics, (2014) 15(1):51.

Yamamoto H. Probabilistic Over-Representation Analysis for Metabolite Set Enrichment Analysis Considering Undetected Metabolites", Jxiv, (2024).

See Also

ora_det, ora_all, ora_est

Examples

# Example1 : Metabolome data
data(fasting)
data(pathway)

# pca and pca loading
pca <- prcomp(fasting$X, scale=TRUE)
pca <- pca_loading(pca)

# all detected metabolites
metabolites <- colnames(fasting$X)

# statistically significant negatively correlated metabolites in PC1 loading
SIG <- metabolites[pca$loading$R[,1] < 0 & pca$loading$p.value[,1] < 0.05]
DET <- metabolites

# Fix for multiple annotations
DET[DET == "UDP-glucose ; UDP-galactose"] <- "UDP-glucose"
DET[DET == "Isonicotinamide ; Nicotinamide"] <- "Nicotinamide"
DET[DET == "1-Methylhistidine ; 3-Methylhistidine"] <- "3-Methylhistidine"

# metabolite set list
M <- pathway$fasting

# MSEA by over representation analysis
B <- msea_ora(SIG, DET, M)
B$`Result of MSEA(ORA)`

## Example2 : Proteome data
data(covid19)
data(pathway)

X <- covid19$X$proteomics
Y <- covid19$Y
D <- covid19$D
tau <- covid19$tau

protein_name <- colnames(X)

# pls-rog and pls-rog loading
plsrog <- pls_rog(X,Y,D)
plsrog <- plsrog_loading(plsrog)

# statistically significant proteins
index_prot <- which(plsrog$loading$R[,1]>0 & plsrog$loading$p.value[,1]<0.05)
sig_prot <- protein_name[index_prot]

# protein set list
M <- pathway$covid19$proteomics

# MSEA by over representation analysis
B <- msea_ora(sig_prot, protein_name, M)
B$`Result of MSEA(ORA)`

## Example3: Metabolome data
data(fasting_mseapca)

SIG <- fasting_mseapca$SIG
DET <- fasting_mseapca$DET
M <- fasting_mseapca$pathway

# Perform ORA using detected metabolites only
B <- msea_ora(SIG, DET, M)
B$`Result of MSEA(ORA)`


[Package mseapca version 2.2.1 Index]