name_na_taxa: Name NA taxa

View source: R/name_na_taxa.R

name_na_taxaR Documentation

Name NA taxa

Description

This function fills in any NA annotation with the lowest known taxonomic annotation (<tax>) from a higher rank (<rank>).

Usage

name_na_taxa(ps_obj, include_rank = T, na_label = "Unknown <tax> (<rank>)")

Arguments

ps_obj

A phyloseq object

include_rank

Whether to include the rank of the lowest known annotation

na_label

The label to assign to each filled in NA annotation.

Value

A phyloseq object

Examples

data(GlobalPatterns)

# Fill in names for NA taxa, including their rank
ps_tmp <- name_na_taxa(GlobalPatterns)
View(tax_table(ps_tmp))

# Leave the rank out and alter the label
ps_tmp <- name_na_taxa(GlobalPatterns, include_rank = F, na_label = "Unknown <tax>")
View(tax_table(ps_tmp))

gmteunisse/Fantaxtic documentation built on June 7, 2024, 8:47 a.m.