This is a good idea.
ggtree is for phylogenetic analysis. Some of the functions cannot be applied to other objects, such as igraph. To make support more smooth, you need to convert the igraph object to a phylo object. Thus, after conversion, ggtree can be used to render and support all functions.
The problem for the conversion is that igraph allows you to use a singleton, as in the example published, while phylo does not, because it does not make sense in evolution.
I will consider the possibility of developing a conversion function in a future version.
link
G Yu , DK Smith, H Zhu, Y Guan, TTY Lam * . ggtree: R package for visualization and annotation of phylogenetic trees with their covariates and other related data . Methods in the field of ecology and evolution . doi:10.1111/2041-210X.12628 .
source share