Check Filter Effect

checkAbundanceCutOffs(x, abundance_thres = NULL, prevalence_thres = NULL)

checkPrevalenceCutOffs(x, abundance_thres = NULL, prevalence_thres = NULL)

Arguments

x

phyloseq object

abundance_thres

If using 'checkAbundanceCutOffs', can have multiple numeric values like c(0.1, 0.01, 0.001, 0.0001). If using 'checkPrevalenceCutOffs', a single value.

prevalence_thres

If using 'checkPrevalenceCutOffs', can have multiple numeric values like c(0.05, 0.1, 0.15, 0.2). If using 'checkAbundanceCutOffs', a single value.

Value

A tibble

Details

Investigate effect of abundance and prevalence thresholds on taxa numbers.

checkAbundanceCutOffs check how many taxa are lost at different abundance thresholds.

checkPrevalenceCutOffs check how many taxa are lost at different prevalence thresholds.

References

Shetty SA (2020). Utilities for microbiome analytics. https://github.com/microsud/biomeUtils

Author

Sudarshan A. Shetty

Examples

library(biomeUtils)
library(microbiome)
data("FuentesIliGutData")
ps.rel <- microbiome::transform(FuentesIliGutData, "compositional")
ab.check <- checkAbundanceCutOffs(ps.rel,
                                  abundance_thres = c(0.0001, 0.001, 0.01, 0.1),
                                  prevalence_thres = 0.1)
ab.check
#>   Abundance Taxa_lost TotalTaxa PrevalenceCutOff
#> 1     1e-04       310       905              0.1
#> 2     0.001       654       905              0.1
#> 3      0.01       847       905              0.1
#> 4       0.1       905       905              0.1

pv.check <- checkPrevalenceCutOffs(ps.rel,
                                   abundance_thres = 0.01,
                                   prevalence_thres = c(0.05, 0.1, 0.15, 0.2))
pv.check
#>   Prevalence Taxa_lost TotalTaxa AbundanceCutOff
#> 1       0.05       809       905            0.01
#> 2        0.1       847       905            0.01
#> 3       0.15       864       905            0.01
#> 4        0.2       876       905            0.01