View source: R/taxonomy-based.R
| plot_ts_heatmap | R Documentation |
A quick way to create a heatmap from a taxa summary dataframe.
Samples are grouped by a category that is specified in type_header.
plot_ts_heatmap(
tax_table,
metadata_map,
min_rel_abund,
type_header,
scale_by = "all",
custom_sample_order,
rev_taxa = FALSE,
custom_taxa_order,
other_label,
remove_other = FALSE,
colors = c("blue", "white", "red")
)
tax_table |
A taxa table dataframe. The output of
|
metadata_map |
A metadata mapping dataframe. Usually,
|
min_rel_abund |
The minimum mean relative abundance for a taxon to not be grouped into 'Other'. Between 0 and 1. |
type_header |
The metadata_map header label used to group samples. |
scale_by |
[OPTIONAL] Whether to scale colors by (a) 'sample_types', (b) 'taxa', or (c) 'all'. Default = 'all'. |
custom_sample_order |
[OPTIONAL] A vector with the order of the sample names (top to bottom). |
rev_taxa |
[OPTIONAL] Set to |
custom_taxa_order |
[OPTIONAL] A vector with the order of the taxa names
(top to bottom). Note that these are the names after grouping low abundance
taxa into either 'Other' or your custom |
other_label |
[OPTIONAL] A string to relabel the 'Other' taxa category
which contain all taxa less than |
remove_other |
[OPTIONAL] Set to |
colors |
[OPTIONAL] A vector with custom fill colors (low, mid, high). |
ts = summarize_taxonomy(fruits_veggies, 2) plot_ts_heatmap(ts, fruits_veggies$map_loaded, 0.03, 'Sample_type')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.