prop_filter: Filter OTUs by Abundance

Description Usage Arguments Details Value

View source: R/prop_filter.R

Description

Allows subsetting of a phyloseq object according to the relative abundance of OTUs in a minimal number of samples. Returns a logical vector of OTUs that are at least n% of the sequences in at leas m samples.

Usage

1
prop_filter(x, n, m)

Arguments

x

A phyloseq object.

n

Minimum percentage to keep OTU.

m

Minimum number of samples.

Details

The functions creates a logical vector to be used in subsetting a phyloseq object acording to the relative abundance of OTUs in a given nuber of samples. For example, if n = 1 and m = 2, then the OTUs to be kept must represent at least 1% of the sequences in at least 2 samples. The vector is then used as an argument to the phyloseq object 'prune_taxa'.

Value

A logical vector of OTUs to keep.


jfq3/QsRutils documentation built on Jan. 18, 2021, 12:40 a.m.