View source: R/plot_functions.R
heat_tree_pq | R Documentation |
metacoder
package using tax_table
slotNote that the number of ASV is store under the name n_obs
and the number of sequences under the name nb_sequences
heat_tree_pq(physeq, taxonomic_level = NULL, ...)
physeq |
(required): a |
taxonomic_level |
(default: NULL): a vector of selected taxonomic level using their column numbers (e.g. taxonomic_level = 1:7) |
... |
Arguments passed on to |
A plot
Adrien Taudière
if (requireNamespace("metacoder")) {
library("metacoder")
data("GlobalPatterns", package = "phyloseq")
GPsubset <- subset_taxa(
GlobalPatterns,
GlobalPatterns@tax_table[, 1] == "Bacteria"
)
GPsubset <- subset_taxa(
GPsubset,
rowSums(GPsubset@otu_table) > 5000
)
GPsubset <- subset_taxa(
GPsubset,
rowSums(is.na(GPsubset@tax_table)) == 0
)
heat_tree_pq(GPsubset,
node_size = n_obs,
node_color = n_obs,
node_label = taxon_names,
tree_label = taxon_names,
node_size_trans = "log10 area"
)
heat_tree_pq(GPsubset,
node_size = nb_sequences,
node_color = n_obs,
node_label = taxon_names,
tree_label = taxon_names,
node_size_trans = "log10 area"
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.