Skip to content

search: turn the precursor-calibration pre-pass off by default - #110

Merged
ypriverol merged 1 commit into
mainfrom
perf/precursor-cal-default-off
Oct 6, 2026
Merged

ypriverol merged 1 commit into
mainfrom
perf/precursor-cal-default-off

Conversation

@ypriverol

@ypriverol ypriverol commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Why

--precursor-cal auto (the default) runs a pre-pass before the main search. It searches a sample of spectra, learns a ppm shift, and tightens the precursor window. On the benchmark VM (8 threads, main 7e93bdc1) it never fired, yet it took a large share of every run:

dataset pre-pass time share of the run outcome
Astral 17 s ~9% skipped
TMT a05058 11 s ~17% skipped
UPS1 7 s ~17% skipped
Phospho PXD007653 133 s ~15% skipped

Why it never fires. The gate needs 150 targets at 1% q on the raw score among 500 sampled spectra. Before Percolator the raw score doesn't get there:

  • Astral: the pre-pass forces rank scoring, and among the best 484 PSMs 278 are targets and 206 decoys, so only 2 targets pass at 1%.
  • Low-res sets: about 45% of sampled PSMs fall under the RawScore floor before the q-value step even runs.

Where it does fire, it costs identifications. On the same VM, Percolator -Y, seeds 42/1/2:

  • The 2,000-spectrum arm fired on UPS1 only. It learned a 0.036 ppm shift and tightened the window from 20 to 6.5 ppm (σ from the best 200 PSMs).
  • UPS1 PSMs fell 7.6%: 15,838 / 15,701 / 15,777 → 14,572 / 14,642 / 14,528, at about the same entrapment count (166 / 148 / 151 → 155 / 154 / 154).
  • The other two arms didn't help: 2,000 spectra on Astral and TMT, and q ≤ 5% on all three sets, still never fired.

Change

  • The default is now off; --precursor-cal auto|on keep the old behaviour.
  • The CLI help, DOCS, README and config.example.yaml are updated.

Effect on outputs: on all four benchmark sets the pre-pass never changed the search, so outputs are unchanged and every run drops its pre-pass time.

Workspace tests and clippy (-D warnings) pass.

Summary by CodeRabbit

  • Documentation
    • Updated the documented and example default for precursor calibration to off.
    • Clarified the command-line help with benchmark observations. Accepted values and the documented behavior of auto, .raw, and .d remain unchanged.

The pre-pass costs 9-17% of a run and, on the benchmark VM, fired on
none of Astral (17 s), TMT (11 s), UPS1 (7 s) or phospho (133 s): its
gate needs 150 targets at the raw score's own 1% q among 500 sampled
spectra, and before Percolator the raw score does not get there (on
high-res, where the pre-pass forces rank scoring, only 2 of 484 pass).
Where a 2,000-spectrum sample did make it fire (UPS1), it learned a
0.036 ppm shift and tightened the window to 6.5 ppm, which lost 7.6% of
PSMs at the same entrapment count.

Default is now off; --precursor-cal auto|on keep the behaviour. On the
four benchmark sets the output is unchanged, since the pre-pass never
changed it.
@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing

@coderabbitai

coderabbitai Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: dc68dba2-c455-411b-8530-a6a7d6a44933
📥 Commits

Reviewing files that changed from the base of the PR and between 7e93bdc and e5ba2f4.

📒 Files selected for processing (4)
  • DOCS.md
  • README.md
  • config.example.yaml
  • crates/andes/src/bin/andes/cli.rs

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The --precursor-cal default changes from auto to off in the CLI and example configuration. Documentation updates the default, adds benchmark observations, and removes a model-selection claim about auto.

Changes

Precursor Calibration Default

Layer / File(s) Summary
Update the precursor calibration default
crates/andes/src/bin/andes/cli.rs, config.example.yaml, DOCS.md, README.md
The CLI and example configuration now default to off. The CLI keeps the accepted modes unchanged and adds benchmark figures to its help text. DOCS.md adds benchmark observations; README.md no longer says auto learns the run’s precursor shift.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: timosachsenberg

Merge Risk: ⚪ Minimal · up to e5ba2

The precursor-calibration pre-pass is now skipped by default as intended. Users can still enable it through YAML or the CLI, so no material merge risk is identified.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly states the main change: turning the precursor-calibration pre-pass off by default.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
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.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@ypriverol
ypriverol merged commit b5dcbc9 into main Oct 6, 2026
5 checks passed
@ypriverol
ypriverol deleted the perf/precursor-cal-default-off branch October 15, 2026 16:05
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