pres_abund_filter: Filter phyloseq-object based on presence/absence

Description Usage Arguments Value Examples

View source: R/pres_abund_filter.R

Description

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.

Usage

1
pres_abund_filter(ps, pres = 2, abund = 0.001, verbose = TRUE)

Arguments

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

Value

A filtered phyloseq-object.

Examples

1
2
3
4
data(ps_NP)
phyloseq::ntaxa(ps_NP)
ps_NP_filt <- ps_NP %>% pres_abund_filter()
phyloseq::ntaxa(ps_NP_filt)

wsteenhu/microbiomer documentation built on March 11, 2021, 6:05 p.m.