MMINP.preprocess {MMINP} | R Documentation |
Data Preprocessing function for MMINP
Description
Before doing MMINP analysis, abundances of both microbial features and metabolites should be preprocessed. Both measurements are expected to be transformed to relative abundance (i.e. proportion) and be log-transformed. To meet the need of O2-PLS method, data must be scaled.
Usage
MMINP.preprocess(
data,
normalized = TRUE,
prev = NA,
abund = NA,
logtransformed = TRUE,
scaled = TRUE
)
Arguments
data |
A numeric matrix or data frame containing measurements of metabolites or microbial features. |
normalized |
Logical, whether to transform measurements into relative abundance or not. |
prev |
A numeric ranging from 0 to 1, the minimum prevalence of features to be retained. If set to NA, means no need to filter prevalence. |
abund |
A numeric greater than 0, the minimum abundance (mean) of features to be retained. If set to NA, means no need to filter abundance. |
logtransformed |
Logical, whether do log transformation or not. |
scaled |
Logical, whether scale the columns of data or not. |
Details
The rows of data must be samples and columns of data must be metabolites or
microbial features.
The filtering process (prev
and abund
) is before log
transformation and scale transformation.
Value
A preprocessed numeric matrix for analysis of MMINP.
Examples
data(train_metag)
d <- MMINP.preprocess(train_metag)
d <- MMINP.preprocess(train_metag, prev = 0.3, abund = 0.001)
d[1:5, 1:5]