runDA | R Documentation |
Run the differential abundance detection methods.
runDA(method_list, object, weights = NULL, verbose = TRUE)
method_list |
a list object containing the methods and their parameters. |
object |
a phyloseq object. |
weights |
an optional numeric matrix giving observational weights. |
verbose |
an optional logical value. If |
A named list containing the results for each method.
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))
# Set some simple normalizations
my_norm <- setNormalizations()
# Add them to the phyloseq object
ps <- runNormalizations(normalization_list = my_norm, object = ps)
# Set some limma instances
my_methods <- set_limma(design = ~ group, coef = 2,
norm = c("TMM", "poscounts", "CSS"))
# Run the methods
results <- runDA(method_list = my_methods, object = ps)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.