Description Usage Arguments Value Examples
View source: R/pres_abund_filter.R
By default, this function implements a filter used by Subramanian et al., Nature, 2014. It selects those OTUs/ASVs present at or above a level of confident detection (0.1% relative abundance) in at least 2 samples. This filter, especially using DADA2 data, results in a strong reduction of taxa, yet the total number of reads should not drop too much. Always be considerate when using these filters, e.g. when running alpha-diversity measures it might not be appropriate to use.
1 | pres_abund_filter(ps, pres = 2, abund = 0.001, verbose = TRUE)
|
ps |
phyloseq-object (can be contain raw reads/relative abundance) |
pres |
number of samples in which given OTU/ASV should at least be present to be included |
abund |
abundance which given OTU/ASV should at least be present |
verbose |
(logical) print information on number of ASVs included/excluded |
A filtered phyloseq-object.
1 2 3 4 | data(ps_NP)
phyloseq::ntaxa(ps_NP)
ps_NP_filt <- ps_NP %>% pres_abund_filter()
phyloseq::ntaxa(ps_NP_filt)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.