Public methods
Method new()
Usage
trans_alpha$new(dataset = NULL, group = NULL, order_x = NULL)
Arguments
- dataset
- the object of - microtableClass.
 
groupdefault NULL; the sample column used for the statistics; If provided, can return alpha_stat.
order_xdefault NULL; sample_table column name or a vector containg sample names; if provided, order samples by using factor.
Returns
alpha_data and alpha_stat stored in the object.
Examples
\donttest{
data(dataset)
t1 <- trans_alpha$new(dataset = dataset, group = "Group")
}
Method cal_diff()
Test the difference of alpha diversity across groups.
Usage
trans_alpha$cal_diff(method = c("KW", "anova")[1], measures = NULL)Arguments
- method
- default "KW"; "KW" or "anova"; KW rank sum test or anova for the testing. 
measuresdefault NULL; a vector; if null, all indexes will be calculated; see names of alpha_diversity of dataset, 
e.g. Observed, Chao1, ACE, Shannon, Simpson, InvSimpson, Fisher, Coverage, PD.
Returns
res_alpha_diff in object.
Examples
\donttest{
t1$cal_diff(method = "KW")
t1$cal_diff(method = "anova")
}
Method plot_alpha()
Plotting the alpha diveristy.
Usage
trans_alpha$plot_alpha(
  color_values = RColorBrewer::brewer.pal(8, "Dark2"),
  measure = "Shannon",
  group = NULL,
  add_letter = FALSE,
  use_boxplot = TRUE,
  boxplot_color = TRUE,
  boxplot_add = "jitter",
  order_x_mean = TRUE,
  pair_compare = FALSE,
  pair_compare_filter = "",
  pair_compare_method = "wilcox.test",
  xtext_type = NULL,
  xtext_size = 10,
  ytitle_size = 17,
  base_font = "sans",
  ...
)
Arguments
- color_values
- colors used for presentation. 
measuredefault Shannon; alpha diveristy measurement; see names of alpha_diversity of dataset, 
e.g. Observed, Chao1, ACE, Shannon, Simpson, InvSimpson, Fisher, Coverage, PD.
groupdefault NULL; group name used for the plot.
add_letterdefault FALSE; If TRUE, the letters of duncan test will be added in the plot.
use_boxplotdefault TRUE; TRUE: boxplot, FALSE: mean_se plot.
boxplot_colordefault TRUE; TRUE: use color_values, FALSE: use "black".
boxplot_adddefault "jitter"; points type, see the add parameter in ggpubr::ggboxplot.
order_x_meandefault FALSE; whether order x axis by the means of groups from large to small.
pair_comparedefault FALSE; whether perform paired comparisons.
pair_compare_filterdefault ""; groups that need to be removed in the comparisons.
pair_compare_methoddefault wilcox.test; wilcox.test, kruskal.test, t.test or anova.
xtext_typedefault NULL; number used to make x axis text generate angle.
xtext_sizedefault 10, x axis text size.
ytitle_sizedefault 17, y axis title size.
base_fontdefault "sans", font in the plot.
...parameters pass to ggpubr::ggboxplot function.
Returns
ggplot.
Examples
\donttest{
t1$plot_alpha(measure = "Shannon", group = "Group", pair_compare = TRUE)
}
Method print()
Print the trans_alpha object.
Usage
trans_alpha$print()
Method clone()
The objects of this class are cloneable with this method.
Usage
trans_alpha$clone(deep = FALSE)
Arguments
- deep
- Whether to make a deep clone.