View source: R/phyloseq_add_max_tax_rank.R
phyloseq_add_max_tax_rank | R Documentation |
Add the lowest level of taxonomic classification to the taxonomy table of phyloseq-class object.
phyloseq_add_max_tax_rank(physeq, abbreviate = F, ...)
physeq |
A phyloseq-class object |
abbreviate |
Logical; if TRUE, lowest taxon name will be abbreviated (useful for plotting). Default is FALSE |
... |
Additional arguments may be passed to |
Phyloseq object with modified taxonomy table.
# Load data
data("GlobalPatterns")
# Subset data to 5% of the most abundant taxa (just for the example)
GP <- phyloseq_filter_top_taxa(GlobalPatterns, perc = 5)
# Add the lowest level of taxonomic classification to the taxonomy table
GP <- phyloseq_add_max_tax_rank(GP, abbreviate = T)
# Replace taxa names with abbreviated lowest taxa ranks,
# e.g., this names could be placed on ordination plot
taxa_names(GP) <- as.data.frame(tax_table(GP))$LowestTaxon
tail(taxa_names(GP))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.