prettyTree: Draw an annotated phylogenetic tree.

Description Usage Arguments Details Value Note Author(s) See Also Examples

View source: R/prettyTree.R

Description

Extends plot.phylo to draw a phylogenetic tree with additional annotation.

Usage

1
2
3
4
5
6
7
8
9
prettyTree(x, groups, fill,
           X, O, indices, labels,
           show = rep(TRUE, length(x)),
           largs = list(cex = 0.75, bty = "n", yjust = 0.5),
           parargs = list(mar = c(bottom = 5, left = 2, top = 2,
                              right = ifelse(is.null(largs), 2, 8)),
               xpd = NA),
           pointargs = list(), glyphs,
           shuffleGlyphs = NA, ...)

Arguments

x

an object of class phylo, eg x <- nj(ddist)

groups

a factor (or object coercible) to a factor assigning group identity to leaf nodes in x

fill

vector (logical or indices) of points to fill

X

vector of points to mark with an X

O

vector of points to mark with a circle

indices

label points with indices (all points if 'yes', or a subset indicated by a vector)

labels

character vector of tip labels in the same order as x$tip.label

show

boolean vector of points to show

largs

arguments controlling appearance of the legend or NULL for no legend

parargs

arguments to pass par()

pointargs

arguments to pass points() (other than pch, col, bg)

glyphs

a data.frame with columns named 'col' and 'pch' corresponding to elements of unique(groups)

shuffleGlyphs

NA or an integer (argument to set.seed)

...

passed to plot.phylo

Details

prettyTree adds to a plot drawn by plot.phylo

Vectors specifying annotation should be in the order of row or column labels of the distance matrix used to generate x.

Value

Plots to the active device; no return value.

Note

See package vignette for additional examples.

Author(s)

Noah Hoffman

See Also

plot.phylo

Examples

1
2
3
4
library(ape)
data(seqs)
data(seqdat)
prettyTree(nj(dist.dna(seqs)), groups=seqdat$tax_name)

clstutils documentation built on Nov. 8, 2020, 5:23 p.m.