YuLab-SMU / treeio

:seedling: Base Classes and Functions for Phylogenetic Tree Input and Output
https://yulab-smu.top/treedata-book/
94 stars 24 forks source link

convert igraph to phylo #99

Closed xiangpin closed 1 year ago

xiangpin commented 1 year ago

Description

This PR updates the as.phylo.igraph for the network igraph.

Related Issue

Example

library(treeio)
library(ggtree)
set.seed(123)
g <- igraph::sample_gnp(10, 3/10)
tr <- as.phylo(g)
p <- ggtree(tr, layout='rad')
p

捕获