taxa_prune: Remove specific taxa from all samples based on a given...

View source: R/taxa_prune.R

taxa_pruneR Documentation

Remove specific taxa from all samples based on a given classification level. Function from the phylosmith-package.

Description

Prunes taxa from phyloseq objects based on taxanomic names.

Usage

taxa_prune(phyloseq_obj, taxa_to_remove,
classification=NULL, na_rm=FALSE)

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.

taxa_to_remove

A vector of the classification names of the taxon to be removed. If you are using ASVs and want to remove specific sequences, this should be set OTU or NULL. By default, it will search for the names in all taxanomic ranks

classification

Column name as a string or numeric in the tax_table for the factor to conglomerate by.

na_rm

if TRUE, and classification is specified, will remove taxon at the classificaiton level that have NA values.

Value

phyloseq-object

See Also

tax_glom()

Examples

taxa_prune(soil_column, "Firmicutes", "Phylum")

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