mp_plot_diff_boxplot | R Documentation |
displaying the differential result contained abundance and LDA with boxplot (abundance) and error bar (LDA).
mp_plot_diff_boxplot(
.data,
.group,
.size = 2,
errorbar.xmin = NULL,
errorbar.xmax = NULL,
point.x = NULL,
taxa.class = "all",
group.abun = FALSE,
removeUnknown = FALSE,
...
)
## S4 method for signature 'MPSE'
mp_plot_diff_boxplot(
.data,
.group,
.size = 2,
errorbar.xmin = NULL,
errorbar.xmax = NULL,
point.x = NULL,
taxa.class = "all",
group.abun = FALSE,
removeUnknown = FALSE,
...
)
## S4 method for signature 'tbl_mpse'
mp_plot_diff_boxplot(
.data,
.group,
.size = 2,
errorbar.xmin = NULL,
errorbar.xmax = NULL,
point.x = NULL,
taxa.class = "all",
group.abun = FALSE,
removeUnknown = FALSE,
...
)
## S4 method for signature 'grouped_df_mpse'
mp_plot_diff_boxplot(
.data,
.group,
.size = 2,
errorbar.xmin = NULL,
errorbar.xmax = NULL,
point.x = NULL,
taxa.class = "all",
group.abun = FALSE,
removeUnknown = FALSE,
...
)
.data |
MPSE or tbl_mpse after run mp_diff_analysis with 'action="add"'. |
.group |
the column name for mapping the different color. |
.size |
the column name for mapping the size of points or numeric, default is 2. |
errorbar.xmin |
the column name for 'xmin' mapping of error barplot layer, default is NULL. |
errorbar.xmax |
the column name for 'xmax' mapping of error barplot layer, default is NULL. |
point.x |
the column name for 'x' mapping of point layer (right panel), default is NULL. |
taxa.class |
the taxonomy class features will be displayed, default is 'all'. |
group.abun |
logical whether plot the abundance in each group with bar plot, default is FALSE. |
removeUnknown |
logical whether mask the unknown taxonomy information but differential species, default is FALSE. |
... |
additional params, see also the 'geom_boxplot', 'geom_errorbarh' and 'geom_point'. |
data(mouse.time.mpse)
mouse.time.mpse %<>%
mp_rrarefy()
mouse.time.mpse
mouse.time.mpse %<>%
mp_diff_analysis(.abundance=RareAbundance,
.group=time,
first.test.alpha=0.01,
action="add")
library(ggplot2)
p1 <- mouse.time.mpse %>%
mp_plot_diff_boxplot(.group = time) %>%
set_diff_boxplot_color(
values = c("deepskyblue", "orange"),
guide = guide_legend(title=NULL)
)
p1
p2 <- mouse.time.mpse %>%
mp_plot_diff_boxplot(
taxa.class = c(Genus, OTU),
group.abun = TRUE,
removeUnknown = TRUE,
) %>%
set_diff_boxplot_color(
values = c("deepskyblue", "orange"),
guide = guide_legend(title=NULL)
)
p2
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.