Learn R Programming

mseapca (version 2.0.3)

ssea_ora: Single sample enrichment analysis by over representation analysis

Description

This function performs single sample enrichment analysis (SSEA) by over representation analysis (ORA). SSEA performs MSEA by ORA between detected and not detected metabolites in each sample."

Usage

ssea_ora(det_list, det_all, M)

Value

A matrix where each row represents a sample and each column represents a set of metabolites.

Arguments

det_list

metabolite names of detected metabolites

det_all

metabolite names of all metabolites

M

list of metabolite set and metabolite names

Author

Hiroyuki Yamamoto

Details

The threshold for determining whether a metabolite is detected or not is typically set by the signal-to-noise (S/N) ratio. If the S/N ratio is unavailable, one might consider using the signal intensity or peak area for each metabolite as an alternative. In such cases, all values below the threshold can be set to 0.

References

Yamamoto H., Single sample enrichment analysisfor mass spectrometry-based omics data, Jxiv.(2023)

Examples

Run this code
if (FALSE) {
data(fasting)
data(pathway)

det_list <- pathway$data$fasting
M <- pathway$fasting
det_all <- unique(c(colnames(fasting$X), as.character(unlist(M)))) 

# SSEA
Z <- ssea_ora(det_list, det_all, M)

## PCA for SSEA score
pca <- prcomp(Z, scale=TRUE)
pca <- pca_loading(pca)
}

Run the code above in your browser using DataLab