26 Visualization of functional enrichment results
The enrichplot package is the presentation layer of the Biomedical Knowledge Mining Toolkit. It visualizes canonical enrichment objects produced by clusterProfiler, DOSE, ReactomePA, meshes, enrichit, and related workflows. Both over-representation analysis (ORA) and gene set enrichment analysis (GSEA) are supported.
The key rule is to decide what evidence needs to be communicated before choosing a plot:
| Question | Recommended route |
|---|---|
| Which terms are enriched and how should they be ranked? | Common summary plots |
| Which genes and terms form connected modules? | Gene–term and term–term networks |
| Where is a GSEA signal located and which genes drive it? | GSEA and distribution views |
| How do clusters or conditions differ visually? | Compare functional profiles |
| How should a checked result be polished or extended? | Publication-ready and specialized views |
| How can an external result table enter this system? | Import and visualize external results |
26.1 Object and evidence contract
Keep the result object, filtering rule, color meaning, database identity, and export parameters with every figure. barplot(), dotplot(), cnetplot(), emapplot(), treeplot(), gseaplot2(), and the import helpers consume structured objects; they do not repair an incorrect identifier namespace, background universe, or statistical design.
The detailed material is now split by task so that each page can be read and rendered independently. This page remains the stable landing page for the historical enrichplot.qmd#sec-enrichplot URL.
26.2 Legacy anchor index
The old monolithic chapter is retained as a compatibility shell. The following aliases preserve common historical fragments while pointing readers to their new task-oriented pages:
#cnetplot → Gene–term and term–term networks
#treeplot-labels → Tree plot label controls
#ssplot → Semantic space plot
#sec-import-other-tools → Import and visualize external results
#sec-import-custom → Arbitrary result tables
26.2.1 Historical figure fragments
Old links to figures landed on this page. The aliases below keep those URLs meaningful while directing readers to the corresponding new chapter. Figure labels remain unchanged in the destination files.
-
#fig-Barplot→ Common summary plots -
#fig-Dotplotcap→ Common summary plots -
#fig-cnetNodeLabel→ Network plots -
#fig-Heatplot→ Network plots -
#fig-treeplot→ Network plots -
#fig-Enrichment→ Network plots -
#fig-Enrichment-node-label→ Network plots -
#fig-Enrichment2→ Comparison plots -
#fig-upsetORA→ Network plots -
#fig-upsetGSEA→ Network plots -
#fig-ridgeplot→ GSEA views -
#fig-gseaplot→ GSEA views -
#fig-gseaplot2→ GSEA views -
#fig-pmcplot→ Specialized views -
#fig-volplot→ Specialized views -
#fig-hplot→ Specialized views -
#fig-goplot→ Specialized views -
#fig-import-enrichr→ Import chapter -
#fig-import-gost→ Import chapter -
#fig-import-webgestalt→ Import chapter -
#fig-import-fgsea→ Import chapter -
#fig-import-custom→ Import chapter
The historical source file used to contain all plotting methods in one 1,548-line chapter. It is intentionally no longer duplicated here: duplicate code would create conflicting chunk labels, stale caches, and two competing explanations of the same function. Use the task pages above for maintained content.