KasperSkytte / ampvis2

Tools for visualising microbial community amplicon data
https://kasperskytte.github.io/ampvis2/
GNU General Public License v3.0
66 stars 23 forks source link

How to export a dendrogram from PCoA #118

Closed LingTJ closed 2 years ago

LingTJ commented 2 years ago

Hi! Dear ampvis2 delevopers, I received important helps from this package for a long time. Thank you so much for this wonderfule package. Now I'm able to plot PCoA based on bray method of hellinger transformed data table. But I really need to export a PCoA dendrogram showing similar information to the PCoA scatter plot. I explored the ampvis2 webpages but this is no such function. Would you please give me a hand? Just a few lines of R commands will be helpful. Thank you so much!

TJ 20210729

KasperSkytte commented 2 years ago

Hi there

If you just need a dendrogram, there is no need to do ordination. You would simply plot a dendrogram of a set of clusters defined by some algorithm, like hclust(). But if you want to overlay a dendrogram on an ordination plot, you will have to do that manually, and it's probably not easy. Check out vegan::ordicluster(). You can just export the vegan model from amp_ordinate() with the detailed_output = TRUE option and continue with vegan functions.

LingTJ commented 2 years ago

Dear Kasper, Thank you so much for your reply in time. I appreciate your help. I'm studying vegan::ordicluster() in the package of vegan now.

TJ

------------------ 原始邮件 ------------------ 发件人: "MadsAlbertsen/ampvis2" @.>; 发送时间: 2021年7月30日(星期五) 下午3:14 @.>; @.**@.>; 主题: Re: [MadsAlbertsen/ampvis2] How to export a dendrogram from PCoA (#118)

Hi there

If you just need a dendrogram, there is no need to do ordination. You would simply plot a dendrogram of a set of clusters defined by some algorithm, like hclust(). But if you want to overlay a dendrogram on an ordination plot, you will have to do that manually, and it's probably not easy. Check out vegan::ordicluster(). You can just export the vegan model from amp_ordinate() with the detailed_output = TRUE option and continue with vegan functions.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.