Skip to content

Commit f0e184f

Browse files
committed
ci: install BiasedUrn, which weighted ORA stops without
The Publish Quarto Book run on 2583a25 failed at the Render step with The package "BiasedUrn" is required for weighted ORA. BiasedUrn is in enrichit's Suggests, not its Imports, so pak never installs it on a fresh runner. enrichment-network.qmd's weighted-ORA chunk calls ora(weight = w), and enrichit's ora() runs rlang::check_installed('BiasedUrn') on that path -- it stops rather than degrading to unweighted ORA, so the chapter cannot render. Verified locally by hiding the installed package and re-running the chapter's exact call: the same error appears, and with the package back the weighted ora() and gsea() both run against the demo GSON. Fix in three parts, following the rule that a CI dependency list is trimmed by runtime reachability rather than by counting mentions in the .qmd sources: - add cran::BiasedUrn to the CRAN install list; - add it to the verify-loadable step so a future omission is a 10-second failure instead of a 21-minute one; - document the requirement in the chapter, since the dependency is invisible in the prose. Also checked the rest of the dependency surface: the only other packages named in the chapters that are not installed locally (COSG, createKEGGdb, KEGG.db, STRINGdb, SeuratData, AnnotationForge, rcartocolor) all sit in eval: false or commented-out chunks, so none of them is on an executed path.
1 parent 2583a25 commit f0e184f

2 files changed

Lines changed: 27 additions & 2 deletions

File tree

‎.github/workflows/publish-book.yml‎

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,13 @@ jobs:
8888
# europepmc pmcplot() enrichplot-specialized.qmd
8989
# ggstar dotplot.compareClusterResult() the compareCluster chapters
9090
# ggrepel .manhattanplot_internal() enrichplot-summary.qmd
91+
# BiasedUrn ora(..., weight = ) enrichment-network.qmd
92+
#
93+
# BiasedUrn is enrichit's Suggests, not its Imports, so it is absent
94+
# unless named. The weighted-ORA chunk in enrichment-network.qmd calls
95+
# ora(weight = w), which stops on check_installed('BiasedUrn') rather
96+
# than degrading to unweighted ORA. The book runs the weighted path,
97+
# so the package has to be on the runner.
9198
#
9299
# ggstar and ggrepel probably arrive transitively today (ggtreeExtra,
93100
# ggplot2). Listing them costs a few seconds and stops that from silently
@@ -128,7 +135,8 @@ jobs:
128135
"cran::ggupset",
129136
"cran::ggridges",
130137
"cran::shadowtext",
131-
"cran::ggforce"
138+
"cran::ggforce",
139+
"cran::BiasedUrn"
132140
))'
133141
134142
- name: Install Bioconductor dependencies (release)
@@ -159,7 +167,8 @@ jobs:
159167
Rscript -e 'required <- c(
160168
"org.Hs.eg.db", "fgsea", "GO.db", "ChIPseeker", "MeSHDbi", "biomaRt", "pathview",
161169
"R.utils", "ggarchery", "europepmc", "ggstar", "ggrepel", "ggupset", "ggridges",
162-
"ggplotify", "httr2", "dotenv", "msigdbr", "ggplot2", "dplyr", "stringr", "forcats"
170+
"ggplotify", "httr2", "dotenv", "msigdbr", "ggplot2", "dplyr", "stringr", "forcats",
171+
"BiasedUrn"
163172
); missing <- required[!vapply(required, requireNamespace, logical(1), quietly = TRUE)]; if (length(missing)) stop("Missing packages: ", paste(missing, collapse = ", "))'
164173
165174
# aisdk.providers carries the DeepSeek and other non-bundled adapters;

‎enrichment-network.qmd‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,22 @@ head(as.data.frame(res_wora)[, c("ID", "SetSize", "Count", "pvalue")])
245245
head(as.data.frame(res_wgsea)[, c("ID", "setSize", "enrichmentScore", "NES", "pvalue")])
246246
```
247247

248+
::: {.callout-note}
249+
## Weighted ORA needs `BiasedUrn` installed
250+
251+
`BiasedUrn` is a *suggested* package of `enrichit`, so a default install does not
252+
bring it in. Weighted ORA calls `BiasedUrn::pWNCHypergeo()` and **stops** when it
253+
is missing — it does not fall back to ordinary ORA:
254+
255+
```r
256+
Error: The package "BiasedUrn" is required for weighted ORA.
257+
```
258+
259+
Install it with `install.packages("BiasedUrn")` before running this section.
260+
Weighted GSEA is unaffected; the weights are fused into the ranked statistics
261+
before the C++ engine, so no extra package is needed.
262+
:::
263+
248264
::: {.callout-warning}
249265
## `weight` must share the namespace of the genes
250266

0 commit comments

Comments
 (0)