R/diversity_beta_test.R
diversity_beta_test.Rd
Beta diversity test (by default we use bray-curtis distance)
diversity_beta_test( MAE, tax_level, input_beta_method, input_select_beta_condition, input_select_beta_stat_method, input_num_permutation_permanova = 999 )
MAE | A multi-assay experiment object |
---|---|
tax_level | The taxon level used for organisms |
input_beta_method | bray, jaccard |
input_select_beta_condition | Which condition to group samples |
input_select_beta_stat_method | PERMANOVA,Kruskal-Wallis,Wilcoxon test |
input_num_permutation_permanova | number of permutations |
A plotly object
data_dir = system.file('extdata/MAE.rds', package = 'animalcules') toy_data <- readRDS(data_dir) p <- diversity_beta_test(toy_data, tax_level = 'genus', input_beta_method = 'bray', input_select_beta_condition = 'DISEASE', input_select_beta_stat_method = 'PERMANOVA', input_num_permutation_permanova = 999) p#> Permutation test for adonis under reduced model #> Terms added sequentially (first to last) #> Permutation: free #> Number of permutations: 999 #> #> vegan::adonis2(formula = dist.mat ~ condition, data = sam_table, permutations = input_num_permutation_permanova) #> Df SumOfSqs R2 F Pr(>F) #> condition 1 0.2286 0.01583 0.7722 0.619 #> Residual 48 14.2108 0.98417 #> Total 49 14.4394 1.00000