phyloseq_rm_na_tax: Remove unused taxonomy levels from phyloseq-object.

View source: R/physeq_rm_na_tax.R

phyloseq_rm_na_taxR Documentation

Remove unused taxonomy levels from phyloseq-object.

Description

Remove unused taxonomy levels from phyloseq-object.

Usage

phyloseq_rm_na_tax(physeq)

Arguments

physeq

A phyloseq-class object

Details

This function is particularly useful after tax_glom.

'phyloseq_rm_na_tax' will remove columns filled with NA values from the taxonomy table of phyloseq object.

Value

Phyloseq object.

See Also

tax_table

Examples

data(GlobalPatterns)
gp <- tax_glom(GlobalPatterns, taxrank="Family")  # 7 taxonomic ranks
head(tax_table(gp))   # last columns are filled with NAs

# Remove taxonomic levels filled with NAs
gp2 <- phyloseq_rm_na_tax(gp)  # 5 taxonomic ranks
head(tax_table(gp2))


vmikk/metagMisc documentation built on June 20, 2024, 7:20 a.m.