|
|
xi | |
|
|
xv | |
Preface |
|
xvii | |
Structure of the book |
|
xvii | |
Software information and conventions |
|
xviii | |
Acknowledgments |
|
xix | |
About the Author |
|
xxi | |
|
Part I Tree data input, output, and manipulation |
|
|
1 | (70) |
|
1 Importing Tree with Data |
|
|
3 | (30) |
|
1.1 Overview of Phylogenetic Tree Construction |
|
|
3 | (2) |
|
1.2 Phylogenetic Tree Formats |
|
|
5 | (8) |
|
|
5 | (1) |
|
|
6 | (2) |
|
1.2.3 New Hampshire eXtended format |
|
|
8 | (1) |
|
|
8 | (1) |
|
|
9 | (4) |
|
1.3 Getting Tree Data with treeio |
|
|
13 | (18) |
|
|
15 | (2) |
|
1.3.2 Function demonstration |
|
|
17 | (10) |
|
1.3.3 Converting other tree-like objects to phylo or treedata objects |
|
|
27 | (1) |
|
1.3.4 Getting information from treedata object |
|
|
28 | (3) |
|
|
31 | (2) |
|
2 Manipulating Tree with Data |
|
|
33 | (26) |
|
2.1 Manipulating Tree Data Using Tidy Interface |
|
|
33 | (4) |
|
|
33 | (2) |
|
2.1.2 The treedata object |
|
|
35 | (1) |
|
2.1.3 Access related nodes |
|
|
36 | (1) |
|
|
37 | (8) |
|
2.2.1 Combining tree data |
|
|
37 | (4) |
|
2.2.2 Linking external data to phylogeny |
|
|
41 | (2) |
|
|
43 | (2) |
|
|
45 | (4) |
|
2.4 Rescaling Tree Branches |
|
|
49 | (1) |
|
2.5 Subsetting Tree with Data |
|
|
50 | (3) |
|
2.5.1 Removing tips in a phylogenetic tree |
|
|
50 | (1) |
|
2.5.2 Subsetting tree by tip label |
|
|
50 | (3) |
|
2.5.3 Subsetting tree by internal node number |
|
|
53 | (1) |
|
2.6 Manipulating Tree Data for Visualization |
|
|
53 | (4) |
|
|
57 | (2) |
|
3 Exporting Tree with Data |
|
|
59 | (12) |
|
|
59 | (1) |
|
3.2 Exporting Tree Data to BEAST Nexus Format |
|
|
60 | (6) |
|
3.2.1 Exporting/converting software output |
|
|
60 | (1) |
|
3.2.2 Combining tree with external data |
|
|
61 | (3) |
|
3.2.3 Merging tree data from different sources |
|
|
64 | (2) |
|
3.3 Exporting Tree Data to the jtree Format |
|
|
66 | (3) |
|
|
69 | (2) |
|
Part II Tree data visualization and annotation |
|
|
71 | (88) |
|
4 Phylogenetic Tree Visualization |
|
|
73 | (24) |
|
|
73 | (1) |
|
4.2 Visualizing Phylogenetic Tree with ggtree |
|
|
74 | (8) |
|
4.2.1 Basic Tree Visualization |
|
|
75 | (1) |
|
4.2.2 Layouts of a phylogenetic tree |
|
|
76 | (6) |
|
4.3 Displaying Tree Components |
|
|
82 | (10) |
|
4.3.1 Displaying treescale (evolution distance) |
|
|
82 | (1) |
|
4.3.2 Displaying nodes/tips |
|
|
82 | (1) |
|
|
83 | (2) |
|
4.3.4 Displaying root-edge |
|
|
85 | (1) |
|
|
85 | (3) |
|
|
88 | (3) |
|
4.3.7 Modify components of a theme |
|
|
91 | (1) |
|
4.4 Visualize a List of Trees |
|
|
92 | (3) |
|
4.4.1 Annotate one tree with values from different variables |
|
|
94 | (1) |
|
|
95 | (1) |
|
|
95 | (2) |
|
5 Phylogenetic Tree Annotation |
|
|
97 | (14) |
|
5.1 Visualizing and Annotating Tree Using Grammar of Graphics |
|
|
97 | (1) |
|
5.2 Layers for Tree Annotation |
|
|
98 | (9) |
|
|
98 | (5) |
|
|
103 | (1) |
|
|
104 | (2) |
|
5.2.4 Uncertainty of evolutionary inference |
|
|
106 | (1) |
|
5.3 Tree Annotation with Output from Evolution Software |
|
|
107 | (3) |
|
5.3.1 Tree annotation using data from evolutionary analysis software |
|
|
107 | (3) |
|
|
110 | (1) |
|
6 Visual Exploration of Phylogenetic Trees |
|
|
111 | (12) |
|
6.1 Viewing Selected Clade |
|
|
112 | (1) |
|
6.2 Scaling Selected Clade |
|
|
113 | (1) |
|
6.3 Collapsing and Expanding Clade |
|
|
114 | (2) |
|
|
116 | (1) |
|
6.5 Exploring Tree Structure |
|
|
117 | (4) |
|
|
121 | (2) |
|
7 Plotting Tree with Data |
|
|
123 | (12) |
|
7.1 Mapping Data to The tree Structure |
|
|
123 | (1) |
|
7.2 Aligning Graph to the Tree Based on the Tree Structure |
|
|
124 | (2) |
|
7.3 Visualize a Tree with an Associated Matrix |
|
|
126 | (4) |
|
7.3.1 Visualize a tree with multiple associated matrices |
|
|
129 | (1) |
|
7.4 Visualize a Tree with Multiple Sequence Alignments |
|
|
130 | (1) |
|
|
131 | (2) |
|
|
133 | (2) |
|
8 Annotating Tree with Silhouette Images and Sub-plots |
|
|
135 | (12) |
|
8.1 Annotating Tree with Images |
|
|
135 | (1) |
|
8.2 Annotating Tree with Phylopic |
|
|
136 | (1) |
|
8.3 Annotating Tree with Sub-plots |
|
|
137 | (2) |
|
8.3.1 Annotate with bar charts |
|
|
138 | (1) |
|
8.3.2 Annotate with pie charts |
|
|
138 | (1) |
|
8.3.3 Annotate with mixed types of charts |
|
|
139 | (1) |
|
8.4 Have Fun with Phylomoji |
|
|
139 | (6) |
|
8.4.1 Emoji in circular/fan layout tree |
|
|
141 | (1) |
|
8.4.2 Emoji to label clades |
|
|
142 | (2) |
|
|
144 | (1) |
|
8.4.4 Phylomoji in ASCII art |
|
|
145 | (1) |
|
|
145 | (2) |
|
9 Ggtree for Other Tree-like Objects |
|
|
147 | (12) |
|
9.1 Ggtree for Phylogenetic Tree Objects |
|
|
147 | (6) |
|
9.1.1 The phylo4 and phylo4d objects |
|
|
147 | (1) |
|
|
148 | (2) |
|
9.1.3 The phyloseq object |
|
|
150 | (3) |
|
9.2 Ggtree for Dendrograms |
|
|
153 | (1) |
|
9.3 Ggtree for Tree Graph |
|
|
154 | (1) |
|
9.4 Ggtree for Other Tree-like Structures |
|
|
155 | (3) |
|
|
158 | (1) |
|
Part III Ggtree extensions |
|
|
159 | (22) |
|
10 Ggtree Extra for Presenting Data on a Circular Layout |
|
|
161 | (16) |
|
|
161 | (1) |
|
10.2 Aligning Graphs to the Tree Based on a Tree Structure |
|
|
161 | (2) |
|
10.3 Aligning Multiple Graphs to the Tree for Multi-dimensional Data |
|
|
163 | (4) |
|
10.4 Examples for Population Genetics |
|
|
167 | (8) |
|
|
175 | (2) |
|
11 Other ggtree Extensions |
|
|
177 | (4) |
|
11.1 Taxonomy Annotation Using MicrobiotaProcess |
|
|
177 | (2) |
|
11.2 Visualizing Phylogenetic Network Using Tanggle |
|
|
179 | (1) |
|
|
180 | (1) |
|
Part IV Miscellaneous topics |
|
|
181 | (28) |
|
|
183 | (14) |
|
|
183 | (2) |
|
|
183 | (2) |
|
|
185 | (1) |
|
|
185 | (2) |
|
|
187 | (1) |
|
|
188 | (2) |
|
12.4.1 Expand x limit for a specific facet panel |
|
|
188 | (1) |
|
12.4.2 Expand plot limit by the ratio of plot range |
|
|
189 | (1) |
|
|
190 | (2) |
|
|
190 | (1) |
|
12.5.2 Flatten list-column tree data |
|
|
191 | (1) |
|
|
192 | (4) |
|
|
192 | (2) |
|
12.6.2 Padding taxa labels |
|
|
194 | (2) |
|
12.7 Interactive ggtree Annotation |
|
|
196 | (1) |
|
13 Gallery of Reproducible Examples |
|
|
197 | (12) |
|
13.1 Visualizing pairwise nucleotide sequence distance with a phylogenetic tree |
|
|
197 | (3) |
|
13.2 Displaying Different Symbolic Points for Bootstrap Values |
|
|
200 | (2) |
|
13.3 Highlighting Different Groups |
|
|
202 | (3) |
|
13.4 Phylogenetic Tree with Genome Locus Structure |
|
|
205 | (4) |
|
A Frequently Asked Questions |
|
|
209 | (20) |
|
|
209 | (1) |
|
|
210 | (1) |
|
A.2.1 Use your local file |
|
|
210 | (1) |
|
|
210 | (1) |
|
A.3.1 Inherit aesthetic mapping |
|
|
210 | (1) |
|
A.3.2 Never use $ in aesthetic mapping |
|
|
211 | (1) |
|
|
211 | (5) |
|
A.4.1 Tip label truncated |
|
|
211 | (1) |
|
A.4.2 Modify (tip) labels |
|
|
212 | (1) |
|
A.4.3 Formatting (tip) labels |
|
|
213 | (2) |
|
A.4.4 Avoid overlapping text labels |
|
|
215 | (1) |
|
A.4.5 Bootstrap values from Newick format |
|
|
215 | (1) |
|
|
216 | (7) |
|
A.5.1 Plot the same tree as in plot.phylo() |
|
|
216 | (1) |
|
A.5.2 Specifying the order of the tips |
|
|
217 | (1) |
|
A.5.3 Shrink outlier long branch |
|
|
218 | (1) |
|
A.5.4 Attach a new tip to a tree |
|
|
219 | (2) |
|
A.5.5 Change colors or line types of arbitrarily selected branches |
|
|
221 | (1) |
|
A.5.6 Add an arbitrary point to a branch |
|
|
222 | (1) |
|
A.6 Different X-axis Labels for Different Facet Panels |
|
|
223 | (1) |
|
A.7 Plot Something behind the Phylogeny |
|
|
223 | (1) |
|
A.8 Enlarge Center Space in Circular/Fan Layout Tree |
|
|
224 | (1) |
|
A.9 Use the Most Distant Tip from the Root as the Origin of the Timescale |
|
|
225 | (1) |
|
A.10 Remove Blank Margins for Circular Layout Tree |
|
|
225 | (3) |
|
A.11 Edit Tree Graphic Details |
|
|
228 | (1) |
|
|
229 | (10) |
|
B.1 MicrobiotaProcess: Convert Taxonomy Table to a treedata Object |
|
|
229 | (1) |
|
B.2 rtol: An R Interface to Open Tree API |
|
|
230 | (1) |
|
B.3 Print ASCII-art Rooted Tree |
|
|
231 | (3) |
|
B.4 Zoom in on the Selected Portion |
|
|
234 | (1) |
|
B.5 Tips for Using ggtree with ggimage |
|
|
234 | (2) |
|
B.5.1 Example 1: Remove background of images |
|
|
235 | (1) |
|
B.5.2 Example 2: Plot tree on a background image |
|
|
235 | (1) |
|
B.6 Run ggtree in Jupyter Notebook |
|
|
236 | (3) |
Figures and Tables |
|
239 | (4) |
Publications of the ggtree Package Suite |
|
243 | (2) |
References |
|
245 | (8) |
Index |
|
253 | |