Skip to content

Changing PEP default option to be the score-based Ispline - #403

Merged
percolator merged 1 commit into
percolator:masterfrom
statisticalbiotechnology:score_based
May 21, 2026
Merged

percolator merged 1 commit into
percolator:masterfrom
statisticalbiotechnology:score_based

Conversation

@percolator

@percolator percolator commented May 21, 2026 •

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

Release Notes

  • Bug Fixes
    • Updated default PEP calculation method to use interpolating approach for improved accuracy
    • Modified command-line option interface for rank-based PEP selection

Review Change Stack

@coderabbitai

coderabbitai Bot commented May 21, 2026 •

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

The PR flips the default PEP interpolation behavior from rank-based to interpolating. The Scores::calcPep method's interpol parameter now defaults to true, and the Caller class initializes useInterpolatingPep_ to true. The CLI option is renamed from --ip-pep to --rank-pep and now disables interpolating PEP when specified.

Changes

PEP Interpolation Defaults

Layer / File(s) Summary
Scores::calcPep default parameter
src/Scores.h
Scores::calcPep interpol parameter default is changed from false to true.
Caller PEP interpolation default and CLI option
src/Caller.cpp
Caller constructor initializes useInterpolatingPep_ to true instead of false, and the CLI option is renamed from --ip-pep to --rank-pep, which sets useInterpolatingPep_ to false when specified.

🎯 2 (Simple) | ⏱️ ~10 minutes

🐰 The PEP path shifts with subtle grace,
From rank-based roots to interpolate's place,
CLI flags flip their meaning round,
Defaults refined, new logic found!

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title mentions 'score-based Ispline' but the changes actually make interpolating PEP (not score-based) the new default, contradicting the stated objective. Revise the title to accurately reflect that interpolating PEP is now the default, such as 'Change default PEP calculation to interpolating mode' or similar.
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
src/Caller.cpp (1)

395-398: ⚡ Quick win

Keep a deprecated --ip-pep alias for compatibility.

Line 395 and Line 512 introduce --rank-pep and remove the old flag behavior; this can break existing scripts unexpectedly. Consider accepting --ip-pep as a deprecated alias (with warning) for at least one release.

Suggested compatibility patch
   cmd.defineOption("",
       "rank-pep",
       "Use rank instead of score as independent variable when calculating PEPs.",
       "", TRUE_IF_SET);
+  cmd.defineOption("",
+      "ip-pep",
+      "DEPRECATED: use --rank-pep. Use rank instead of score as independent variable when calculating PEPs.",
+      "", TRUE_IF_SET);
@@
   if (cmd.isOptionSet("rank-pep")) {
     useInterpolatingPep_ = false;
   }
+  if (cmd.isOptionSet("ip-pep")) {
+    useInterpolatingPep_ = false;
+    if (VERB > 0) {
+      std::cerr << "Warning: --ip-pep is deprecated; use --rank-pep instead."
+                << std::endl;
+    }
+  }

Also applies to: 512-514

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/Caller.cpp` around lines 395 - 398, Add a deprecated alias for the
removed flag by accepting the old "--ip-pep" option in the same place where
"cmd.defineOption(..., \"rank-pep\", ...)" is defined: register "--ip-pep" as an
equivalent option that sets the same internal flag or variable used by the new
"rank-pep" option, and emit a one-time warning (via existing logging/console
mechanism) informing users that "--ip-pep" is deprecated and will be removed in
a future release; ensure the parsing logic (where the code reads the rank-pep
flag) treats either option as identical so existing scripts continue to work.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@src/Caller.cpp`:
- Around line 395-398: Add a deprecated alias for the removed flag by accepting
the old "--ip-pep" option in the same place where "cmd.defineOption(...,
\"rank-pep\", ...)" is defined: register "--ip-pep" as an equivalent option that
sets the same internal flag or variable used by the new "rank-pep" option, and
emit a one-time warning (via existing logging/console mechanism) informing users
that "--ip-pep" is deprecated and will be removed in a future release; ensure
the parsing logic (where the code reads the rank-pep flag) treats either option
as identical so existing scripts continue to work.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 0270619c-ff4c-4c77-b56d-d6fd5716f616

📥 Commits

Reviewing files that changed from the base of the PR and between c23a7e2 and b23fc70.

📒 Files selected for processing (2)
  • src/Caller.cpp
  • src/Scores.h

@percolator
percolator merged commit d238b6f into percolator:master May 21, 2026
4 checks passed
@percolator
percolator deleted the score_based branch May 21, 2026 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant