View source: R/phyloseq_coverage.R
phyloseq_coverage_raref | R Documentation |
This function performs coverage-based rarefaction (interpolation) based on the analytical approach proposed by Chao and Jost (2012).
phyloseq_coverage_raref(
physeq,
coverage = NULL,
iter = 1,
replace = F,
correct_singletons = FALSE,
seeds = NULL,
multithread = F,
drop_lowcoverage = F,
...
)
physeq |
A phyloseq-class object |
coverage |
Numeric value for a particular sample coverage (between 0 and 1) |
iter |
Number of rarefication iterations |
replace |
Logical, whether to sample with replacement (TRUE) or without replacement (FALSE, default) |
correct_singletons |
Logical; if TRUE, singleton counts will be corrected with modified Good–Turing frequency formula (Chiu, Chao 2016) |
seeds |
Integer vector used for the reproducible random subsampling (should be of the same length as the number of iterations) |
multithread |
Logical or integer; if TRUE, attempts to run the function on multiple cores; integer defines the number of cores to use (if it is set to TRUE, all cores will be used) |
drop_lowcoverage |
Logical; if TRUE, samples with coverage lower than selected value will be removed (default, FALSE) |
... |
Additional arguments will be passed to |
Samples standardized by size will have different degrees of completness. When we compare samples with the same coverage, we are making sure that samples are equally complete and that the unsampled species constitute the same proportion of the total individuals in each community (Chao, Jost, 2012).
List of rarefied phyloseq-objects (or a single phyloseq object if iter = 1)
# Load data
data("esophagus")
# Coverage-based rarefaction
eso_raref <- phyloseq_coverage_raref(physeq = esophagus, iter = 1, coverage = 0.8)
# Perform coverage-based rarefaction multiple times (iter = 5)
eso_raref2 <- phyloseq_coverage_raref(physeq = esophagus, iter = 5, coverage = 0.8)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.