Skip to content

Instantly share code, notes, and snippets.

@slavailn
Created May 27, 2022 21:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save slavailn/ef5a1b804ba73300a2cf99b211364976 to your computer and use it in GitHub Desktop.
Save slavailn/ef5a1b804ba73300a2cf99b211364976 to your computer and use it in GitHub Desktop.
bubble plot example to visualize GO or pathway enrichment data
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