KasperSkytte / ampvis2

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

Add plot alpha diversity #170

Closed paulzierep closed 1 month ago

paulzierep commented 6 months ago

We love that tool and currently plan to develop a series of use-case based tutorials using Galaxy. See https://github.com/usegalaxy-eu/project-ideas/issues/41 We will probably also work on using the shiny app as an interactive tool in Galaxy. I really like the plot alpha diversity option, but it does not exist as individual function. Could you maybe add it to the tool stack form here https://github.com/KasperSkytte/Amplicon-visualiser/blob/ba8acbc39868119c63f49dccb3ec12c5b667c759/sourcefiles/plot_sv.R#L72-L149

KasperSkytte commented 5 months ago

Sorry for the late response, I'm not actively developing ampvis2 anymore, new job. But I will take a round going through issues within next weeks. Do you need it now? Also, pull requests are always welcome.

paulzierep commented 5 months ago

@KasperSkytte that is sad to hear, we really like the tool. We will in general use it for multiple workflows in Galaxy, since the plots are awesome. Unfortunately, I seldom find time to actually work on code these days, but if I find a student with decent R knowledge, I will see if we can add some PRs to push this project. The alpha diversity plots should however be rather simple since the code is there, just not in the main repo. Anytime you find to move is to an individual function would be highly appreciated!

KasperSkytte commented 4 months ago

Done. Tell me what you think

library(ampvis2)
#> Loading required package: ggplot2
amp_alphadiv(
  AalborgWWTPs,
  plot = TRUE,
  plot_group_by = "Plant"
)

Created on 2024-05-15 with reprex v2.1.0

KasperSkytte commented 4 months ago

Or optionally a scatter plot instead of a boxplot

library(ampvis2)
#> Loading required package: ggplot2
amp_alphadiv(
  AalborgWWTPs,
  plot = TRUE,
  plot_group_by = "Plant",
  plot_scatter = TRUE
)

Created on 2024-05-15 with reprex v2.1.0

KasperSkytte commented 4 months ago

To stay backwards compatible it will still only output a data frame by default, while plot = TRUE will produce a boxplot.