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

Including the visualisation of the Shannon alpha diversity levels in the amp_ordinate() function #171

Open marcellinaR opened 2 weeks ago

marcellinaR commented 2 weeks ago

Hi ampvis2 team,

I enjoy using the package and having mainly used phyloseq in R, I find ampvis2 very intuitive to use for visualizing microbiome data.

However, I have found a way to plot a PCoA showing Bray-Curtis dissimilarity and Shannon diversity when using Qiime2 ordination methods (see example image below, source: https://github.com/jbisanz/qiime2R). I am currently finalizing my publication and wanted to know if there was a quick way to implement this in the amp_ordinate() function, which I could use to optimize my current PCoAs generated with amp_oridnate(). I am sure this will be useful for other ampvis2 users.

Thank you very much! Marcellina

Screenshot 2024-06-13 at 11 33 41
KasperSkytte commented 1 week ago

Hi there. Sorry for the late reply. But there is not currently a way to do that. It will be a while before I might introduce new features into ampvis2 unless people contribute. But a quick solution would be to calculate the alphadiv metrics on the side using amp_alphadiv(), and then merge with the plot$data object, which is returned from amp_ordinate. After that add an additional ggplot2 geom based on the new column.