Learn R Programming

RAM (version 1.2.1.3)

filter.Taxa: Filter Taxonomic Abundance Matrix by Total Counts Or Maximum Relative Abundance

Description

This function filter taxa group by counts or relative abundance. If filter by counts, taxa having total counts more than a threshhold will be kept. If filter by relative abundance, taxa with the maximum relative abundance greater than a threshhold in at least one subject will be kept.

Usage

filter.Taxa(taxa, drop.unclassified=TRUE, percent=NULL, number=NULL)

Arguments

taxa
the taxonomy abundance matrix: sample x species data frame. See also tax.abund
drop.unclassified
logical, whether or not remove unclassified groups. See also tax.abund
percent
a floating point greater than 0 and less or equals to 1. Filter Taxa table by relative abundance.
number
an integer. FilterTaxa table by total sequence counts.

Value

The value returned by this function is a data frame with taxa met the filter requirement only.

Examples

Run this code
data(ITS1)
g1 <- tax.abund(ITS1, rank="g", drop.unclassified=TRUE)
taxa.fil <- filter.Taxa(g1, percent=0.01)

Run the code above in your browser using DataLab