Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Paired boxplot (e.g. diversity, taxa abundances..) #41

Open
antagomir opened this issue Dec 30, 2021 · 2 comments
Open

Paired boxplot (e.g. diversity, taxa abundances..) #41

antagomir opened this issue Dec 30, 2021 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@antagomir
Copy link
Member

antagomir commented Dec 30, 2021

Add a method that facilitates handy visualization of paired samples on a box/jitterplot, pairs indicated by (coloured lines) as shown in the figure.

Tentative gists for

Current implementation depends on scater and needs to use colData also for assay data. If this can be simplified for a user, such method might have good use in exploratory data analysis.

Figure:
tmp

@antagomir
Copy link
Member Author

After implementing this, an exampl could be added to miaTime vignettes?
microbiome/miaTime#61

@antagomir
Copy link
Member Author

Also the plotAbundance function can be extended to provide grouped boxplots.

Something like:

library(mia)
library(ggplot2)
data(peerj13075)
tse <- peerj13075
df <- data.frame(t(assay(tse)))
df$Geographical_location <- factor(colData(tse)$Geographical_location)
ggplot(df, aes(x=Geographical_location, y=OTU2529)) + geom_boxplot()

But implemented like:

plotAbundance(tse, assay.type="counts", rank = "Phylum", group="Geographical_location", layout="bar")

-> But need to think if it is worth a dedicated wrapper like this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: No status
Development

No branches or pull requests

2 participants