DA_ALDEx2 {benchdamic} | R Documentation |
Fast run for the ALDEx2's differential abundance detection method.
DA_ALDEx2( object, pseudo_count = FALSE, conditions = NULL, mc.samples = 128, test = c("t", "wilcox"), denom = "iqlr", norm = c("TMM", "TMMwsp", "RLE", "upperquartile", "posupperquartile", "none", "ratio", "poscounts", "iterate", "TSS", "CSSmedian", "CSSdefault"), verbose = TRUE )
object |
phyloseq object. |
pseudo_count |
add 1 to all counts if TRUE (default
|
conditions |
A character vector. A description of the data structure used
for testing. Typically, a vector of group labels. For |
mc.samples |
An integer. The number of Monte Carlo samples to use when estimating the underlying distributions. Since we are estimating central tendencies, 128 is usually sufficient. |
test |
A character string. Indicates which tests to perform. "t" runs
Welch's t and Wilcoxon tests. "kw" runs Kruskal-Wallace and glm tests.
"glm" runs a generalized linear model using a |
denom |
A character string. Indicates which features to retain as the denominator for the Geometric Mean calculation. Using "iqlr" accounts for data with systematic variation and centers the features on the set features that have variance that is between the lower and upper quartile of variance. Using "zero" is a more extreme case where there are many non-zero features in one condition but many zeros in another. In this case the geometric mean of each group is calculated using the set of per-group non-zero features. |
norm |
name of the normalization method used to compute the
normalization factors to use in the differential abundance analysis. If
|
verbose |
an optional logical value. If |
A list object containing the matrix of p-values 'pValMat', the matrix of summary statistics for each tag 'statInfo', and a suggested 'name' of the final object considering the parameters passed to the function.
aldex
for the Dirichlet-Multinomial model
estimation. Several and more complex tests are present in the ALDEx2
framework.
set.seed(1) # Create a very simple phyloseq object counts <- matrix(rnbinom(n = 300, size = 3, prob = 0.5), nrow = 50, 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)) # No use of scaling factors ps_NF <- norm_edgeR(object = ps, method = "none") # The phyloseq object now contains the scaling factors: scaleFacts <- phyloseq::sample_data(ps_NF)[, "NF.none"] head(scaleFacts) # Differential abundance DA_ALDEx2(ps_NF, conditions = "group", test = "t", denom = "iqlr", norm = "none")