Description Usage Arguments Details Value Author(s) Examples
lm_meta
runs differential abundance models on microbial profiles
within individual studies/batches, and aggregates per-batch effect sizes with
a meta-analysis fixed/random effects model. It takes as input a
feature-by-sample microbial abundance table and the accompanying meta data
data frame which should includes the batch indicator variable, the main
exposure variable for differential abundance testing, and optional covariates
and random covariates. The function first runs
Maaslin2
models on the exposure with optional
covariates/random covariates in each batch. The per-batch effect sizes are
then aggregated with rma.uni
and reported as output.
Additional parameters, including those for both
Maaslin2
and rma.uni
can be
provided through control
(see details).
1 2 |
feature_abd |
feature-by-sample matrix of abundances (proportions or counts). |
batch |
name of the batch variable. This variable in data should be a factor variable and will be converted to so with a warning if otherwise. |
exposure |
name of the exposure variable for differential abundance testing. |
covariates |
names of covariates to adjust for in Maaslin2 differential abundance testing models. |
covariates_random |
names of random effects grouping covariates to adjust for in Maaslin2 differential abundance testing models. |
data |
data frame of metadata, columns must include exposure, batch, and covariates and covariates_random (if specified). |
control |
a named list of additional control parameters. See details. |
control
should be provided as a named list of the following components
(can be a subset).
character. normalization
parameter for Maaslin2. See
Maaslin2
for details and allowed values. Default to
"TSS"
(total sum scaling).
character. transform
parameter for Maaslin2. See
Maaslin2
for details and allowed values. Default to
"LOG"
(log transformation).
character. analysis_method
parameter for Maaslin2. See
Maaslin2
for details and allowed values. Default to
"LM"
(linear modeling).
character. method
parameter for rma.uni. See
rma.uni
for details and allowed values. Default to
"REML"
(estricted maximum-likelihood estimator).
character. Output directory for intermediate Maaslin2 output and the optional
forest plots. Default to "MMUPHin_lm_meta"
.
character. Suffix in the name for the generated forest plots visualizing
significant meta-analyitical differential abundance effects. Default to
"forest.pdf"
. Can be set to NULL
in which case no output will
be generated.
numeric. Convergence threshold for rma.uni (corresponds to
control$threshold
. See rma.uni
for details.
Default to 1e-4.
integer. Maximum number of iterations allowed for rma.uni (corresponds to
control$maxiter
. See rma.uni
for details.
Default to 1000.
logical. Indicates whether or not verbose information will be printed.
a list, with the following components:
data frame of per-feature meta-analyitical differential abundance results,
including columns for effect sizes, p-values and q-values, heterogeneity
statistics such as τ^2 and I^2, as well as weights for
individual batches. Many of these statistics are explained in detail in
rma.uni
.
list of data frames, each one corresponding to the fitted results of
Maaslin2 in a individual batch. See Maaslin2
on
details of these output.
list of additional control parameters used in the function call.
Siyuan Ma, siyuanma@g.harvard.edu
1 2 3 4 5 6 |
Found 5 batches
Fitting Maaslin2 on batch FengQ_2015.metaphlan_bugs_list.stool...
Fitting Maaslin2 on batch HanniganGD_2017.metaphlan_bugs_list.stool...
Fitting Maaslin2 on batch VogtmannE_2016.metaphlan_bugs_list.stool...
Fitting Maaslin2 on batch YuJ_2015.metaphlan_bugs_list.stool...
Fitting Maaslin2 on batch ZellerG_2014.metaphlan_bugs_list.stool...
Fitting meta-analysis model.
Warning messages:
1: In lm_meta(feature_abd = CRC_abd, exposure = "study_condition", :
Covariate gender is missing or has only one non-missing value in the following batches; will be excluded from model for these batches:
HanniganGD_2017.metaphlan_bugs_list.stool, YuJ_2015.metaphlan_bugs_list.stool
2: In lm_meta(feature_abd = CRC_abd, exposure = "study_condition", :
Covariate age is missing or has only one non-missing value in the following batches; will be excluded from model for these batches:
HanniganGD_2017.metaphlan_bugs_list.stool, YuJ_2015.metaphlan_bugs_list.stool
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.