DA_ANCOM | R Documentation |
Fast run for ANCOM and ANCOM-BC2 differential abundance detection methods.
DA_ANCOM(
object,
assay_name = "counts",
pseudo_count = FALSE,
fix_formula = NULL,
adj_formula = NULL,
rand_formula = NULL,
lme_control = lme4::lmerControl(),
contrast = NULL,
alpha = 0.05,
p_adj_method = "BH",
struc_zero = FALSE,
BC = TRUE,
n_cl = 1,
verbose = TRUE
)
object |
a phyloseq or TreeSummarizedExperiment object. |
assay_name |
the name of the assay to extract from the
TreeSummarizedExperiment object (default |
pseudo_count |
add 1 to all counts if TRUE (default
|
fix_formula |
Used when |
adj_formula |
Used when |
rand_formula |
Optionally used when |
lme_control |
a list of control parameters for mixed model fitting.
See |
contrast |
character vector with exactly, three elements: a string indicating the name of factor whose levels are the conditions to be compared, the name of the level of interest, and the name of the other level. |
alpha |
numeric. Level of significance. Default is 0.05. |
p_adj_method |
character. method to adjust p-values. Default is "holm".
Options include "holm", "hochberg", "hommel", "bonferroni", "BH", "BY",
"fdr", "none". See |
struc_zero |
logical. Whether to detect structural zeros based on
|
BC |
boolean for ANCOM method to use. If TRUE the bias correction
(ANCOM-BC2) is computed (default |
n_cl |
numeric. The number of nodes to be forked. For details, see
|
verbose |
an optional logical value. If |
A list object containing the matrix of p-values 'pValMat',
a matrix of summary statistics for each tag 'statInfo', and a suggested
'name' of the final object considering the parameters passed to the
function. ANCOM (BC = FALSE) does not produce p-values but W statistics.
Hence, 'pValMat' matrix is filled with 1 - W / (nfeatures - 1)
values
which are not p-values. To find DA features a threshold on this statistic
can be used (liberal < 0.4, < 0.3, < 0.2, < 0.1 conservative).
ancombc
for analysis of microbiome
compositions with bias correction or without it
ancom
.
set.seed(1)
# Create a very simple phyloseq object
counts <- matrix(rnbinom(n = 60, size = 3, prob = 0.5), nrow = 10, ncol = 6)
metadata <- data.frame("Sample" = c("S1", "S2", "S3", "S4", "S5", "S6"),
"group" = as.factor(c("A", "A", "A", "B", "B", "B")))
ps <- phyloseq::phyloseq(phyloseq::otu_table(counts, taxa_are_rows = TRUE),
phyloseq::sample_data(metadata))
# Differential abundance
DA_ANCOM(object = ps, pseudo_count = FALSE, fix_formula = "group", contrast =
c("group", "B", "A"), verbose = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.