R 帮助为 MiRKAT 创建树

R Help creating tree for MiRKAT

我正在尝试创建一个与 R 包 MiRKAT 一起使用的树,但是由于文档很难理解,我希望这里有人能帮助我。

我的数据在结构中:

         Acaryochloris Achromobacter Acidiphilium Acidisphaera
Sample1             23             1            0            4                 
Sample2              0             0            2            0                 
Sample3              4             0            4            0                 
Sample4              0            30            0            5                 
Sample5             11             0            5            0                 
Sample6              0             0            0            0 

并且包采用小插图中的结构树:

List of 4
 $ edge       : int [1:1710, 1:2] 857 858 859 860 861 862 863 864 865 866 ...
 $ Nnode      : int 855
 $ tip.label  : chr [1:856] "1883" "3114" "1483" "2576" ...
 $ edge.length: num [1:1710] 0.00846 0.09451 0.01012 0.01208 0.03501 ...
 - attr(*, "class")= chr "phylo"      

可以在以下位置找到小插图:http://research.fhcrc.org/content/dam/stripe/wu/files/MiRKAT/MiRKAT_Vignette.pdf

有什么办法可以把我的数据变成这样的树状结构吗?如果是这样,你能推荐任何包吗?

对不起各位,我自己发现了。

mydata_dist <- dist(mydata)
mydata_hc <- hclust(mydata_dist)
mydata_phyl <- as.phylo(mydata_hc)