| plotTrees | R Documentation |
plotTrees plots a tree or group of trees
plotTrees(
trees,
nodes = FALSE,
tips = NULL,
tipsize = NULL,
scale = 0.01,
palette = "Dark2",
base = FALSE,
show_occupancy = FALSE,
layout = "rectangular",
node_nums = FALSE,
tip_nums = FALSE,
title = TRUE,
labelsize = NULL,
common_scale = FALSE,
ambig = "grey",
bootstrap_scores = FALSE,
tip_palette = NULL,
node_palette = NULL,
guide_title = NULL,
branch_lengths = NULL,
pch = 16,
densitree = FALSE,
alpha = 1
)
trees |
A tibble containing |
nodes |
color internal nodes if possible? |
tips |
color tips if possible? |
tipsize |
size of tip shape objects |
scale |
width of branch length scale bar |
palette |
color palette for tips and/or nodes. Can supply a named vector for all tip states, or a palette named passed to ggplot2::scale_color_brewer (e.g. "Dark2", "Paired", "Set1") or ggplot2::scale_color_distiller (e.g. RdYlBu) or |
base |
recursion base case (don't edit) |
show_occupancy |
if plotting trees from an expectedOccupancy model in TyCHE, will color branch lengths by expected occupancy in the first state if true. Requires palette to be specified as a named vector in order of: c(state1=color1, state2+state1=color2, state2=color3). |
layout |
rectangular or circular tree layout? |
node_nums |
plot internal node numbers? |
tip_nums |
plot tip numbers? |
title |
use clone id as title? |
labelsize |
text size |
common_scale |
stretch plots so branches are on same scale? determined by sequence with highest divergence |
ambig |
How to color ambiguous node reconstructions? (grey or blend) |
bootstrap_scores |
Show bootstrap scores for internal nodes? See getBootstraps. |
tip_palette |
deprecated, use palette |
node_palette |
deprecated, use palette |
guide_title |
Title of color guide. Defaults to tips variable if specified. |
branch_lengths |
Use branch lenghts? Use "none" if not. |
pch |
Numeric tip/node shape. If >20 will use "fill" instead of "color" |
densitree |
Use densitree visualization? Requires trees_with_traits/trees posterior
to be loaded in (see posterior options in |
alpha |
Alpha value for ggtree. Lower makes the tree more transparent. |
Function uses ggtree functions to plot tree topologies estimated by
getTrees, and findSwitches. Object can be further modified with
ggtree functions. Please check out
https://bioconductor.org/packages/devel/bioc/vignettes/ggtree/inst/doc/ggtree.html and
cite ggtree in addition to dowser if you use this function.
a grob containing a tree plotted by ggtree.
getTrees, findSwitches
## Not run:
data(ExampleClones)
trees <- getTrees(ExampleClones[10,])
plotTrees(trees)[[1]]
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.