View source: R/phyloseq_rename_with_tax.R
phyloseq_rename_with_tax | R Documentation |
Rename phyloseq OTUs or species with taxonomy ranks.
phyloseq_rename_with_tax(physeq, taxrank = "Family")
physeq |
A phyloseq-class object |
taxrank |
Character, which taxonomy rank to use for renaming |
A phyloseq-class object with renamed OTUs.
# Load data
data("GlobalPatterns")
# Agglomerate taxa of the same phylum
GP <- tax_glom(GlobalPatterns, taxrank="Phylum")
taxa_names(GP)
# Assign phylum name to the agglomerated taxa
GP <- phyloseq_rename_with_tax(GP, taxrank="Phylum")
taxa_names(GP)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.