taxa_core: Filter taxa in phyloseq-object to only include core taxa....

View source: R/taxa_core.R

taxa_coreR Documentation

Filter taxa in phyloseq-object to only include core taxa. Function from the phylosmith-package.

Description

Inputs a phyloseq object and finds which taxa are seen in a given proportion of samples at a minimum relative abundance, either in the entire dataset, by treatment, or a particular treatment of interest.

Usage

taxa_core(phyloseq_obj, treatment = NULL, subset = NULL,
frequency = 0.5, abundance_threshold = 0.01)

Arguments

phyloseq_obj

A phyloseq-class object. It must contain sample_data()) with information about each sample, and it must contain tax_table()) with information about each taxa/gene.

treatment

Column name as a string or numeric in the sample_data. This can be a vector of multiple columns and they will be combined into a new column.

subset

A factor within the treatment. This will remove any samples that to not contain this factor. This can be a vector of multiple factors to subset on.

frequency

The proportion of samples the taxa is found in.

abundance_threshold

The minimum relative abundance the taxa is found in for each sample.

Value

phyloseq-object

Examples

taxa_core(soil_column, frequency = 0.2, abundance_threshold = 0.01)

schuyler-smith/phyloschuyler documentation built on March 27, 2024, 4:29 p.m.