filterTaxaTotal: Filter Taxa Based on Total Data

View source: R/filterTaxaTotal.R

filterTaxaTotalR Documentation

Filter Taxa Based on Total Data

Description

Filter Taxa Based on Total Data

Arguments

x

phyloseq object.

rank

Taxonomic rank to use like Phylum.

percent_thres

Percent cut-off to use. If value is 10, then all phyla with less that 10 percent of the total counts in all data are removed.

verbose

Logical. Prints a list of removed taxa. Default is TRUE.

Details

Provided a count data phyloseq, filterTaxaTotal calculates the percent of taxon at the rank level is calculated. Those that are less than the percent_thres are removed. This function works with ASV level data as the ASVs are merged at specified level for calculation. Therefore, ASVs that belong to low/rare abundance at a specified rank are removed.

Value

Filtered phyloseq

Author(s)

Sudarshan A. Shetty

Examples

library(biomeUtils)
data('FuentesIliGutData')
# below we filter Family that are less than 2% of the total data
ps.filt <- filterTaxaTotal(FuentesIliGutData,
                           rank = 'Family',
                           percent_thres = 2,
                           verbose = TRUE)
ps.filt


RIVM-IIV-Microbiome/biomeUtils documentation built on July 20, 2023, 10:29 a.m.