Compiled date: 2024-10-02
Last edited: 2024-01-21
License: GPL-3
To install the Bioconductor version of the POMA package, run the following code:
# install.packages("BiocManager")
BiocManager::install("POMA")
library(POMA)
library(ggtext)
library(magrittr)
The POMA
package functions are organized into three sequential, distinct blocks: Data Preparation, Pre-processing, and Statistical Analysis.
The SummarizedExperiment
package from Bioconductor offers well-defined computational data structures for representing various types of omics experiment data (Morgan et al. 2020). Utilizing these data structures can significantly improve data analysis. POMA
leverages SummarizedExperiment
objects, enhancing the reusability of existing methods for this class and contributing to more robust and reproducible workflows.
The workflow begins with either loading or creating a SummarizedExperiment
object. Typically, your data might be stored in separate matrices and/or data frames. The PomaCreateObject
function simplifies this step by quickly building a SummarizedExperiment object for you.
# create an SummarizedExperiment object from two separated data frames
target <- readr::read_csv("your_target.csv")
features <- readr::read_csv("your_features.csv")
data <- PomaCreateObject(metadata = target, features = features)
Alternatively, if your data is already in a SummarizedExperiment
object, you can proceed directly to the pre-processing step. This vignette uses example data provided in POMA
.
# load example data
data("st000336")
st000336
> class: SummarizedExperiment
> dim: 31 57
> metadata(0):
> assays(1): ''
> rownames(31): x1_methylhistidine x3_methylhistidine ... pyruvate
> succinate
> rowData names(0):
> colnames(57): 1 2 ... 56 57
> colData names(2): group steroids
imputed <- st000336 %>%
PomaImpute(method = "knn", zeros_as_na = TRUE, remove_na = TRUE, cutoff = 20)
> 1 features removed.
imputed
> class: SummarizedExperiment
> dim: 30 57
> metadata(0):
> assays(1): ''
> rownames(30): x1_methylhistidine x3_methylhistidine ... pyruvate
> succinate
> rowData names(0):
> colnames(57): 1 2 ... 56 57
> colData names(2): group steroids
normalized <- imputed %>%
PomaNorm(method = "log_pareto")
normalized
> class: SummarizedExperiment
> dim: 30 57
> metadata(0):
> assays(1): ''
> rownames(30): x1_methylhistidine x3_methylhistidine ... pyruvate
> succinate
> rowData names(0):
> colnames(57): 1 2 ... 56 57
> colData names(2): group steroids
PomaBoxplots(imputed, x = "samples") # data before normalization
PomaBoxplots(normalized, x = "samples") # data after normalization
PomaDensity(imputed, x = "features") # data before normalization