Perform a beta diversity test

diversity_beta_test(
  MAE,
  tax_level,
  input_beta_method,
  input_select_beta_condition,
  input_select_beta_stat_method,
  input_num_permutation_permanova = 999
)

Arguments

MAE

A Multi-Assay Experiment object. Required.

tax_level

The taxon level at which organisms should be grouped. Req'd.

input_beta_method

Can be either "bray" or "jaccard". Required.

input_select_beta_condition

Condition to group samples Should be a character string of a colData column name. Required.

input_select_beta_stat_method

The test to be used. Can be one of either "PERMANOVA", "Wilcoxon rank sum test", or "Kruskal-Wallis". Required.

input_num_permutation_permanova

The number of permutations to be used.

Value

A plotly object.

Examples

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 = "Wilcoxon rank sum test",
  input_num_permutation_permanova = 999
)
p
#>         negative and between                               
#> Method  "Wilcoxon rank sum test with continuity correction"
#> P-value "0.819182698655035"                                
#>         positive and between                               
#> Method  "Wilcoxon rank sum test with continuity correction"
#> P-value "0.0370322533362526"                               
#>         positive and negative                              
#> Method  "Wilcoxon rank sum test with continuity correction"
#> P-value "0.166133516296506"