plot_shifts: Plot shift amplitude and location on the tree

Description Usage Arguments Details Value Examples

View source: R/plot_shifts.R

Description

Plot

Usage

1
2
3
4
5
6
7
8
9
plot_shifts(
  tree,
  shifts,
  true_scores = NULL,
  obs_scores = NULL,
  est_scores = NULL,
  sup_scores = NULL,
  digits = 3
)

Arguments

tree

Phylo-class object

shifts

Branch-associated shifts vector, sorted in cladewise order

true_scores

Leaf-associated scores, as a named vector.

obs_scores

Leaf-associated scores, as a named vector.

est_scores

Leaf-associated scores, as a named vector.

sup_scores

A list of lists for additional scores to plot. Each list must contain at least a 'scores" element and eventually a 'title" and 'color' one.

digits

Number of digits to round to.

Details

If scores is unnamed, assumes scores are in the same order as tree$tip.label

Value

a ggplot object, as created by ggtree

Examples

1
2
3
4
tree <- ape::read.tree(text = "(((A,B),C),(D,E));")
shifts <- c(0, -3, 0, 0, 0, 0, -2, 0)
scores <- c(-3.2, -2.8, 0.1, -2.1, -0.1)
plot_shifts(tree, shifts, obs_scores = scores)

abichat/zazou documentation built on Sept. 8, 2021, 6:53 a.m.