accu_samp_threshold {MiscMetabar} | R Documentation |
Compute the number of sequence to obtain a given proportion of ASV in accumulation curves
Description
Usage
accu_samp_threshold(res_accuplot, threshold = 0.95)
Arguments
res_accuplot |
the result of the function accu_plot() |
threshold |
the proportion of ASV to obtain in each samples |
Value
a value for each sample of the number of sequences needed
to obtain threshold
proportion of the ASV
Author(s)
Adrien Taudière
See Also
Examples
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)))
[Package MiscMetabar version 0.9.1 Index]