ggtree: visualizing phylogenetic tree and heterogenous associated...

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/ggtree.R

Description

If you use ggtree in published research, please cite: Guangchuang Yu, David Smith, Huachen Zhu, Yi Guan, Tommy Tsan-Yuk Lam. ggtree: an R package for visualization and annotation of phylogenetic trees with their covariates and other associated data. Methods in Ecology and Evolution 2017, 8(1):28-36, doi:10.1111/2041-210X.12628

drawing phylogenetic tree from phylo object

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
ggtree(
  tr,
  mapping = NULL,
  layout = "rectangular",
  open.angle = 0,
  mrsd = NULL,
  as.Date = FALSE,
  yscale = "none",
  yscale_mapping = NULL,
  ladderize = TRUE,
  right = FALSE,
  branch.length = "branch.length",
  root.position = 0,
  ...
)

Arguments

tr

phylo object

mapping

aesthetic mapping

layout

one of 'rectangular', 'slanted', 'fan', 'circular', 'radial', 'equal_angle', 'daylight' or 'ape'

open.angle

open angle, only for 'fan' layout

mrsd

most recent sampling date

as.Date

logical whether using Date class in time tree

yscale

y scale

yscale_mapping

yscale mapping for category variable

ladderize

logical (default TRUE). Should the tree be re-organized to have a 'ladder' aspect?

right

logical. If ladderize = TRUE, should the ladder have the smallest clade on the right-hand side? See ape::ladderize() for more information.

branch.length

variable for scaling branch, if 'none' draw cladogram

root.position

position of the root node (default = 0)

...

additional parameter

Value

tree

Author(s)

Yu Guangchuang

References

  1. G Yu, TTY Lam, H Zhu, Y Guan (2018). Two methods for mapping and visualizing associated data on phylogeny using ggtree. Molecular Biology and Evolution, 35(2):3041-3043. https://doi.org/10.1093/molbev/msy194

  2. G Yu, DK Smith, H Zhu, Y Guan, TTY Lam (2017). ggtree: an R package for visualization and annotation of phylogenetic trees with their covariates and other associated data. Methods in Ecology and Evolution, 8(1):28-36. https://doi.org/10.1111/2041-210X.12628

See Also

ape::ladderize()

Examples

1
2
3
require(ape) 
tr <- rtree(10)
ggtree(tr)

Example output

Loading required package: ggplot2
Loading required package: treeio
ggtree v1.8.2  For help: https://guangchuangyu.github.io/ggtree

If you use ggtree in published research, please cite:
Guangchuang Yu, David Smith, Huachen Zhu, Yi Guan, Tommy Tsan-Yuk Lam. ggtree: an R package for visualization and annotation of phylogenetic trees with their covariates and other associated data. Methods in Ecology and Evolution 2017, 8(1):28-36, doi:10.1111/2041-210X.12628
Loading required package: ape

Attaching package: 'ape'

The following object is masked from 'package:ggtree':

    rotate

The following objects are masked from 'package:treeio':

    Nnode, Ntip, drop.tip

ggtree documentation built on May 15, 2020, 2 a.m.