-
Notifications
You must be signed in to change notification settings - Fork 0
06 Diagnostic Plots
songif edited this page Jun 12, 2026
·
4 revisions
Draws the null density curve for each selected pathway with the observed DSGE marked as a red dashed line. The GPD tail region is shown in orange. Requires pathway_dsge(..., return_null = TRUE).
# Top 9 by significance
plot_dsge(result, n = 9)
# Specific GO terms
plot_dsge(result, go_ids = c("GO:0007156", "GO:0007268"))
# Standardised scale (requires dsge_std = TRUE in pathway_dsge)
plot_dsge(result, n = 9, use_std = TRUE)
# Save to PDF
pdf("top9.pdf", width = 12, height = 10)
plot_dsge(result, n = 9)
dev.off()| Parameter | Default | Description |
|---|---|---|
result |
(required) | Output of pathway_dsge(..., return_null = TRUE)
|
n |
9 |
Number of top pathways to plot (by p_adj); ignored when go_ids is set |
go_ids |
NULL |
Character vector of GO terms to plot, e.g. c("GO:0007156")
|
col_null |
"steelblue" |
Null distribution density curve colour |
col_obs |
"red" |
Observed DSGE vertical line colour |
col_tail |
"#FFA50040" |
GPD tail region colour (semi-transparent) |
cex_main |
0.85 |
Title font scaling |
use_std |
auto | If TRUE, plot standardised null and dsge_std on x-axis; defaults to TRUE when dsge_std column exists |
Volcano plot visualisation of DSGE results (p-value vs. DSGE / NDS).
The package ships with R scripts for diagnosing null distribution quality:
-
null_density_plot.R: Plots null distribution densities across pathway sizes -
null_density_std_plot.R: Plots standardised null distributions -
gpd_diagnostic_plot.R: Assesses GPD fit quality for tail extrapolation
These are located in inst/scripts/ after installation.