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
)a grob containing a tree plotted by ggtree.
A tibble containing phylo and airrClone
objects
color internal nodes if possible?
color tips if possible?
size of tip shape objects
width of branch length scale bar
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
recursion base case (don't edit)
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).
rectangular or circular tree layout?
plot internal node numbers?
plot tip numbers?
use clone id as title?
text size
stretch plots so branches are on same scale? determined by sequence with highest divergence
How to color ambiguous node reconstructions? (grey or blend)
Show bootstrap scores for internal nodes? See getBootstraps.
deprecated, use palette
deprecated, use palette
Title of color guide. Defaults to tips variable if specified.
Use branch lenghts? Use "none" if not.
Numeric tip/node shape. If >20 will use "fill" instead of "color"
Use densitree visualization? Requires trees_with_traits/trees posterior
to be loaded in (see posterior options in readBEAST).
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.
getTrees, findSwitches
if (FALSE) {
data(ExampleClones)
trees <- getTrees(ExampleClones[10,])
plotTrees(trees)[[1]]
}
Run the code above in your browser using DataLab