View source: R/plot_functions.R
accu_plot | R Documentation |
phyloseq-class
objectNote that as most bioinformatic pipeline discard singleton, accumulation curves from metabarcoding cannot be interpreted in the same way as with conventional biodiversity sampling techniques.
accu_plot(
physeq,
fact = NULL,
add_nb_seq = TRUE,
step = NULL,
by.fact = FALSE,
ci_col = NULL,
col = NULL,
lwd = 3,
leg = TRUE,
print_sam_names = FALSE,
ci = 2,
...
)
physeq |
(required): a |
fact |
(required) Name of the factor in |
add_nb_seq |
(default: TRUE, logical) Either plot accumulation curves using sequences or using samples |
step |
(Integer) distance among points calculated to plot lines. A
low value give better plot but is more time consuming.
Only used if |
by.fact |
(default: FALSE, logical) First merge the OTU table by factor to plot only one line by factor |
ci_col |
Color vector for confidence interval.
Only use if |
col |
Color vector for lines. Only use if |
lwd |
(default: 3) thickness for lines. Only use if |
leg |
(default: TRUE, logical) Plot legend or not. Only use if |
print_sam_names |
(default: FALSE, logical) Print samples names or not?
Only use if |
ci |
(default: 2, integer) Confidence interval value used to multiply the standard error to plot confidence interval |
... |
Additional arguments passed on to |
A ggplot
2 plot representing the richness
accumulation plot if add_nb_seq = TRUE, else, if add_nb_seq = FALSE
return a base plot.
Adrien Taudière
specaccum
accu_samp_threshold()
data("GlobalPatterns", package = "phyloseq")
GP <- subset_taxa(GlobalPatterns, GlobalPatterns@tax_table[, 1] == "Archaea")
GP <- rarefy_even_depth(subset_samples_pq(GP, sample_sums(GP) > 3000))
p <- accu_plot(GP, "SampleType", add_nb_seq = TRUE, by.fact = TRUE, step = 10)
p <- accu_plot(GP, "SampleType", add_nb_seq = TRUE, step = 10)
p + theme(legend.position = "none")
p + xlim(c(0, 400))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.