doWilcoxTest | R Documentation |
Do a Blocked Wilcox Test Taxa on Groups
Do Wilcox Test Taxa and Paire-wise on Groups
doBlockedWilcoxTest( x, features = NULL, sample_group = NULL, block_fct = NULL, adj_method = "BH", ... ) doWilcoxTest(x, sample_group = NULL, paired = FALSE, adj_method = "BH", ...)
x |
A phyloseq object |
features |
Features to test |
sample_group |
Variable in |
block_fct |
Column variable to stratify/block in testing. |
adj_method |
One of "holm", "hochberg", "hommel",
"bonferroni", "BH", "BY", "fdr", "none". Default="BH".
For more information see
|
... |
Additional parameters that are passed on to
|
paired |
Logical TRUE or FALSE passed to
|
Performs one and two sample blocked Wilcoxon tests
wrapper using wilcox_test
.
Useful for comparing large number of taxa between groups while
stratifying by confounder like sex, age, etc.
Performs one and two sample Wilcoxon tests
wrapper using wilcox_test
,
adjust_pvalue
and
add_significance
for an
input phyloseq
object. Useful for comparing
large number of taxa between groups.
A tibble.
A tibble.
Sudarshan A. Shetty
wilcox_test
wilcox_test
library(biomeStats) library(biomeUtils) library(phyloseq) library(microbiome) library(dplyr) data("FuentesIliGutData") feat.to.test <- core_members(getProportions(FuentesIliGutData), 0.01, 25/100) ps <- getProportions(FuentesIliGutData) |> filterSampleData(ILI !="L2") |> filterTaxaByNames(ids = feat.to.test, keep = TRUE) wilcox_results <- doBlockedWilcoxTest(x = ps, features = feat.to.test, sample_group = "ILI", block_fct = "sex", adj_method = "BH") print(wilcox_results) library(biomeStats) library(phyloseq) library(microbiome) library(dplyr) data("FuentesIliGutData") ps <- subset_samples(FuentesIliGutData, ILI %in% c("C", "L1")) ps.rel <- microbiome::transform(ps, "compositional") ps.rel <- core(ps.rel, detection=0.001, prevalence=50/100) wilcox_results <- doWilcoxTest(ps.rel, sample_group = "ILI", paired = FALSE, adj_method = "BH", alternative = "greater") %>% dplyr::filter(p.adj <= 0.05) print(wilcox_results)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.