accu_plot_balanced_modality {MiscMetabar} | R Documentation |
Plot accumulation curves with balanced modality and depth rarefaction
Description
This function (i) rarefy (equalize) the number of samples per modality of a factor and (ii) rarefy the number of sequences per sample (depth). The seed is set to 1:nperm. Thus, with exacly the same parameter, including nperm values, results must be identical.
Usage
accu_plot_balanced_modality(
physeq,
fact,
nperm = 99,
step = 2000,
by.fact = TRUE,
progress_bar = TRUE,
quantile_prob = 0.975,
rarefy_by_sample_before_merging = TRUE,
sample.size = 1000,
verbose = FALSE,
...
)
Arguments
physeq |
(required): a |
fact |
(required) The variable to rarefy. Must be present in
the |
nperm |
(int) The number of permutations to perform. |
step |
(int) distance among points calculated to plot lines. A low value give better plot but is more time consuming. |
by.fact |
(logical, default TRUE) First merge the OTU table by factor to plot only one line by factor |
progress_bar |
(logical, default TRUE) Do we print progress during the calculation? |
quantile_prob |
(float, |
rarefy_by_sample_before_merging |
(logical, default TRUE): rarefy_by_sample_before_merging = FALSE is buggy for the moment.Please only use rarefy_by_sample_before_merging = TRUE |
sample.size |
(int) A single integer value equal to the number of
reads being simulated, also known as the depth. See
|
verbose |
(logical). If TRUE, print additional informations. |
... |
Other params for be passed on to |
Value
A ggplot2 plot representing the richness accumulation plot
Author(s)
Adrien Taudière
See Also
accu_plot()
, rarefy_sample_count_by_modality()
, phyloseq::rarefy_even_depth()
Examples
data_fungi_woNA4Time <-
subset_samples(data_fungi, !is.na(Time))
data_fungi_woNA4Time@sam_data$Time <- paste0("time-", data_fungi_woNA4Time@sam_data$Time)
accu_plot_balanced_modality(data_fungi_woNA4Time, "Time", nperm = 3)
data_fungi_woNA4Height <-
subset_samples(data_fungi, !is.na(Height))
accu_plot_balanced_modality(data_fungi_woNA4Height, "Height", nperm = 3)