View source: R/plot_functions.R
accu_samp_threshold | R Documentation |
Note 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_samp_threshold(res_accuplot, threshold = 0.95)
res_accuplot |
the result of the function accu_plot() |
threshold |
the proportion of ASV to obtain in each samples |
a value for each sample of the number of sequences needed
to obtain threshold
proportion of the ASV
Adrien Taudière
accu_plot()
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)
val_threshold <- accu_samp_threshold(p)
summary(val_threshold)
##' Plot the number of sequences needed to accumulate 0.95% of ASV in 50%, 75%
##' and 100% of samples
p + geom_vline(xintercept = quantile(val_threshold, probs = c(0.50, 0.75, 1)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.