gsePathway() does not expose or forward the eps argument to enrichit

Open Beginner friendly
#47 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
76/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
r
Domain
api

Research direction

Start at the ReactomePA::gsePathway() entry point and inspect how it calls enrichit::gsea_gson(). Reproduce the formals() and eps error shown in the issue, then verify that eps and additional GSEA arguments are accepted and forwarded without breaking existing pathway analysis behavior.

Written by the indexing model from the issue text.

Description

Description

Since ReactomePA switched its GSEA implementation from DOSE to enrichit, ReactomePA::gsePathway() no longer exposes either eps or ... and therefore cannot pass eps to the underlying GSEA implementation.

The underlying functions still support this route:

  • enrichit::gsea_gson() accepts ... and forwards it to enrichit::gsea();
  • enrichit::gsea() has the formal argument eps = 1e-10 and passes it to the multilevel implementation.

This appears to be the same regression reported in YuLab-SMU/clusterProfiler#822 and fixed for the clusterProfiler GSEA wrappers in YuLab-SMU/clusterProfiler@69580b07a8c035868ac70d0e0dba430b4d6ea0f9. That fix restored an explicit eps argument and forwarded both eps and additional arguments to enrichit::gsea_gson().

The equivalent ReactomePA wrapper still lacks that forwarding in release 1.56.0 and the current devel implementation.

Minimal reproduction
names(formals(ReactomePA::gsePathway))
# no "eps" and no "..."

ReactomePA::gsePathway(c("1" = 1), eps = 0)
# Error: unused argument (eps = 0)

The error occurs during argument matching, before pathway analysis starts.

Why this matters

For pathways whose true p-values are below 1e-10, the GSEA implementation recommends eps = 0 for better estimation. Without forwarding this argument, users cannot request that calculation or obtain the corresponding log2err estimates through gsePathway().

Expected behavior

gsePathway() should expose eps and pass it to enrichit::gsea_gson(). Restoring ... would also retain access to supported GSEA parameters such as sampleSize, seed, nPermSimple, and scoreType, matching the approach already adopted in clusterProfiler.

Conceptually, the wrapper should include:

gsePathway <- function(
    geneList,
    # existing named parameters,
    eps = 1e-10,
    ...
) {
    res <- enrichit::gsea_gson(
        # existing named arguments,
        eps = eps,
        ...
    )
}
Environment
  • ReactomePA 1.56.0
  • enrichit 0.2.1
  • Bioconductor 3.23
  • R 4.6
Dominant language
R
Stars
46
Forks
10
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from YuLab-SMU/ReactomePA

All issues in YuLab-SMU/ReactomePA

Similar issues

More R issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.