taxa_extract: Extracts specific taxa from all samples based on a given...

View source: R/taxa_extract.R

taxa_extractR Documentation

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

Description

Extracts taxa from phyloseq objects based on taxanomic names.

Usage

taxa_extract(phyloseq_obj, taxa_to_extract, classification = NULL)

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_extract

A vector of the classification names of the taxon to be extracted. If you are using ASVs and want to extract 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.

Value

phyloseq-object

See Also

tax_glom()

Examples

taxa_extract(soil_column, "Firmicutes", "Phylum")

schuyler-smith/phyloschuyler documentation built on Aug. 16, 2024, 5:36 a.m.