paperKB
coga / coga-kb
Help
Sign in

Chunk #23 — Results — Visualization using Ggplot2

Source
clusterProfiler 4.0: A universal enrichment tool for interpreting omics data.
Embedded
yes

Text

The enrichplot package is originally derived from DOSE and clusterProfiler packages and serves as a de facto visualization tool for visualizing enrichment results for outputs from clusterProfiler as well as DOSE, ReactomePA, and meshes. These methods allow users without programming skills to generate effective visualization to explore and interpret results. All the visualization methods implemented are based on ggplot2, which allows customization using the grammar of graphics. Moreover, we also extend ggplot2 to support enrichment results so that users can use the ggplot2 syntax directly to visualize enrichment results. The following example demonstrates the application of ggplot2 grammar of graphics to visualize the GO enrichment result (ORA) as a lollipop chart using the rich factor that was generated in the previous session using the dplyr verbs (Figure 5A).library(ggplot2)library(forcats)ggplot(ego3, showCategory = 10,aes(richFactor, fct_reorder(Description, richFactor))) +geom_segment(aes(xend=0, yend = Description)) +geom_point(aes(color=p.adjust, size = Count)) +scale_color_gradientn(colours=c("#f7ca64", "#46bac2", "#7e62a3"),trans = "log10",guide=guide_colorbar(reverse=TRUE, order=1)) +scale_size_continuous(range=c(2, 10)) +theme_dose(12) +xlab("Rich Factor") +lab(NULL) +ggtitle("Biological Processes")