Plotting Tree with Data
Guangchuang Yu · 2022
Integrating user data to annotate a phylogenetic tree can be done at different levels. The treeio package implements full_join() methods to combine tree data to phylogenetic tree object. The tidytree package supports linking tree data to phylogeny using tidyverse verbs. The ggtree package supports mapping external data to phylogeny for visualization and annotation on the fly. The ggtree package provides two general methods for mapping and visualizing associated external data on phylogenies. The gheatmap() function is designed to visualize the phylogenetic tree with a heatmap of an associated matrix. The width parameter is to control the width of the heatmap. It supports another parameter offset for controlling the distance between the tree and the heatmap, such as allocating space for tip labels.