Introduction

## [1] "[![](https://img.shields.io/badge/tidytree-0.3.5-green.svg)](https://github.com/YuLab-SMU/tidytree)"
## [1] "[![](https://img.shields.io/badge/treeio-1.17.2-green.svg)](https://github.com/YuLab-SMU/treeio)"
## [1] "[![](https://img.shields.io/badge/ggtree-3.1.5.900-green.svg)](https://github.com/YuLab-SMU/ggtree)"
## [1] "[![](https://img.shields.io/badge/ggtreeExtra-1.3.5.990-green.svg)](https://github.com/YuLab-SMU/ggtreeExtra)"

You can’t even begin to understand biology, you can’t understand life, unless you understand what it’s all there for, how it arose - and that means evolution.

β€” Richard Dawkins

🎯 Motivation

The book is meant as a guide for data integration, manipulation and visualization of phylogenetic trees using a suite of R packages, tidytree, treeio and ggtree. Hence, if you are starting to read this book, we assume you have a working knowledge of how to use R and ggplot2.

πŸ“ Citation

If you use the software suite in published research, please cite the most appropriate paper(s) from this list:

  1. G Yu. Using ggtree to visualize data on tree-like structures. Current Protocols in Bioinformatics, 2020, 69:e96. doi: 10.1002/cpbi.96.
  2. LG Wang, TTY Lam, S Xu, Z Dai, L Zhou, T Feng, P Guo, CW Dunn, BR Jones, T Bradley, H Zhu, Y Guan, Y Jiang, G Yu*. treeio: an R package for phylogenetic tree input and output with richly annotated and associated data. Molecular Biology and Evolution. 2020, 37(2):599-603. doi: 10.1093/molbev/msz240.
  3. G Yu*, TTY Lam, H Zhu, Y Guan*. Two methods for mapping and visualizing associated data on phylogeny using ggtree. Molecular Biology and Evolution. 2018, 35(2):3041-3043. doi: 10.1093/molbev/msy194.
  4. G Yu, DK Smith, H Zhu, Y Guan, TTY 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.

πŸ“š Book structure

  • Part 1 (Tree data input, output and manipulation) describes treeio package for tree data input and output, and tidytree package for tree data manipulation.
  • Part 2 (Tree data visualization and annotation) introduces tree visualization and annotation using grammar of graphic syntax implemented in the ggtree package. It emphasizes on presenting tree associated data on the tree.
  • Part 3 (ggtree extensions) introduces ggtreeExtra for presenting data on circular layout trees and other extensions including MicrobiotaProcess and ggnetworx etc..
  • Part 4 (Miscellaneous topics) describes utilities provided by the ggtree package suite and presents a set of reproducible examples.

πŸ’– Want to help?

The book’s source code is hosted on GitHub, at https://github.com/YuLab-SMU/treedata-book. Any feedback on the book is very welcome. Feel free to open an issue on GitHub or send me a pull request if you notice typos or other issues (I’m not a native English speaker ;) ).