phylo.discrete_trait_OTU | R Documentation |
This function highlights taxa in a phylogeny using the groupOTU function in tidytree/ggtree.
phylo.discrete_trait_OTU(
phylo,
trait_list = NULL,
color_palette = viridis(n = length(trait_list)),
phylo_layout = "circular",
ladderize = F,
ladderize_right = F,
tip_label_size = 2,
show_legend = T,
legend_position = "left"
)
phylo |
A phylo object |
trait_list |
Named list, where names corresponds to traits and vectors under each name correspond to taxa associated with that trait. Defaults to NULL (no list is supplied). |
color_palette |
Vector of trait color(s). Defaults to one color per trait using the viridis color scale, i.e., viridis(n = length(trait_list)). |
phylo_layout |
Any ggtree phylogeny layout. Defaults to "circular". |
ladderize |
Re-order tree to have a "ladder" aspect (True or False). Defaults to False. |
ladderize_right |
If ladderize = TRUE, show the smallest clade on the right-hand side (True or False). Defaults to False. |
tip_label_size |
Size of tip labels. Defaults to 2. |
show_legend |
Display legend (True or False). Defaults to True. |
legend_position |
Position of legend. Defaults to "left". |
A ggplot2 object
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.