microbiome / miaViz

Microbiome Analysis Plotting and Visualization
https://microbiome.github.io/miaViz
Artistic License 2.0
10 stars 12 forks source link

Boxplots significance #104

Closed antagomir closed 1 month ago

antagomir commented 1 year ago

For examples with boxplots representing significance, the ggsnignif pkg is now supporting multiple testing correction: https://github.com/const-ae/ggsignif/issues/28#issuecomment-1704469175

-> Would be good to integrate to miaViz so that users can easily draw some standard comparisons that are readily corrected. Like alpha diversity or taxon abundance comparisons between groups for instance.

muhamanz commented 6 months ago

Thank you for your outstanding work on miaVIZ. The current plots from plotExpression can be cluttered and less informative. It would be immensely helpful to have more general plotting functions, such as those incorporating boxplots or violin plots. These additional plot types could better highlight significant species or taxa differences between study groups, especially in DAA analysis. For instance, a grouped boxplot could effectively highlight the significance of differences between study groups, offering a clearer and more informative representation of the data.

Thank you for considering this enhancement.

antagomir commented 6 months ago

Related to #114 ?

antagomir commented 6 months ago

I agree in general. The plots on this could be improved. I am also not a fan of violin plots.

TuomasBorman commented 5 months ago

@muhamanz Now there is support for boxplots https://github.com/alanocallaghan/scater/pull/208

devtools::install_github("alanocallaghan/scater")

library(mia)
library(scater)

data("GlobalPatterns")
tse <- GlobalPatterns

tse <- agglomerateByRank(tse, rank = "Phylum")
tse <- transformAssay(tse, method = "log10", pseudocount = 1)

# As a demonstration, take 5 first taxa
significant <- rownames(tse)[1:5]
plotExpression(tse, features = significant, assay.type = "log10", show_violin = FALSE, show_boxplot = TRUE)
antagomir commented 4 months ago

Related to #41

TuomasBorman commented 4 months ago

I cannot find the PR/issue where I already commented last week, but ggsignif does not support multiple testing. Multiple testing correction was supported in a fork of ggsignif. The author of the fork then created a PR to ggsignif but they found problems in the implementation and it has not proceeded in almost a year. https://github.com/const-ae/ggsignif/pull/133

However, this thing has been taken into account in current version of OMA. Instead of using ggsignif, it uses ggpubr. https://microbiome.github.io/OMA/docs/devel/pages/alpha_diversity.html#visualizing-significance-in-group-wise-comparisons

About creating a wrapper for this into miaViz... that would require quite a lot of work since we have to overwrite plotExpression/plotColData/plotRowData. Can you check if the example in OMA is enough?

antagomir commented 4 months ago

Ok will have to check later. They might be sufficient indeed.

TuomasBorman commented 1 month ago

This is solved with the example in OMA