View source: R/phyloseq_obj_handling.R
taxa_name_bundle | R Documentation |
taxa_name_bundle
bundle taxa names in a phylosq object for a visualization purpose. Minor taxa names will be summarized as "Others". Also, if the taxa name is empty, the function assigns "Undetermined" for the taxa.
taxa_name_bundle(
ps_obj,
taxa_rank_bundled,
top_taxa_n = 10,
new_taxa_rank = "bundled_tax",
taxa_rank_list = c("superkingdom", "kingdom", "phylum", "order", "family", "genus",
"species"),
add_undet = TRUE
)
ps_obj |
Phyloseq object. |
taxa_rank_bundled |
Character. The name of phylogenetic rank that will be bundled. |
top_taxa_n |
Numeric. The number of taxa names that will be retained. |
new_taxa_rank |
Character. The name of the bundled taxa rank. Default is |
taxa_rank_list |
Character vector. The specified taxa ranks are used to determine whether a tax is "Undetermined" or not. |
add_undet |
Logical. If TRUE, "Undetermined" is assigned to undetermined taxa. If FALSE, "Others" is assigned. |
Phyloseq object. Bundled taxa names are in the new_taxa_rank
column.
# taxa_name_bundle(ps_obj, "phylum", top_taxa_n = 10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.