Created
May 27, 2022 21:28
-
-
Save slavailn/ef5a1b804ba73300a2cf99b211364976 to your computer and use it in GitHub Desktop.
bubble plot example to visualize GO or pathway enrichment data
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(ggplot2) | |
library(stringr) | |
theme_set( | |
theme_bw() + | |
theme(legend.position = "right") | |
) | |
ggplot(all_go, aes(x = sample_id, y = reorder(GO.label, Enrichment))) + | |
geom_point(aes(size = Enrichment, fill = P.value), alpha = 0.75, shape = 21) + | |
facet_wrap(~ regulation) + | |
theme(axis.text.y = element_text(size=5)) + | |
theme(axis.text.x = element_text(face="bold")) + | |
theme(axis.title = element_blank()) + | |
theme(legend.position = "right") + | |
scale_fill_gradient(low="bisque", high = "darkred") + | |
scale_size(range = c(1, 10)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment