Repository navigation
[FIX] ProSE: retain peaks in the short final m/z window - #10357
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (4)
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review. 📝 WalkthroughWalkthroughProSE adds configurable local peak filtering for 100 Da windows. The ChangesProSE peak filtering
Sequence Diagram(s)sequenceDiagram
participant ProSEAlgorithm
participant preprocessSpectra_
participant filterLocalPeaks_
participant WindowMower
ProSEAlgorithm->>preprocessSpectra_: pass window_type and fragment tolerance
preprocessSpectra_->>preprocessSpectra_: resolve filtering mode
alt Full quota per window
preprocessSpectra_->>filterLocalPeaks_: select peaks by local intensity quota
else Legacy filtering
preprocessSpectra_->>WindowMower: apply existing window filtering
end
Suggested reviewers: Priority: ➖ Normal Change: Bug fix Merge Risk: ⚪ Minimal · up to The filtering behavior and search-path configuration align with the documented change, and regression tests and TOPP golden comparisons cover the behavior. No material merge risk was established; proceed with normal project checks. Architecture SummaryArchitecture risk: 🔵 Low · up to The change affects 2 systems. Changed systems: Architecture concerns Review detailsSystems and components
Before / after behavior
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 46.15% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 13 functions across 4 files. (4 skipped: 4 unsupported.)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. A rabbit checks the peaks in rows, Comment |
Resolves the conflicts with the two ProSE changes that landed on develop after this branch's last develop merge: #10357 (peaks:window_type, the same final-window retention this branch carried; the develop text and the richer develop test are kept, the branch's duplicate CHANGELOG bullet is dropped) and #10358 (peptide:clip_nterm_methionine, kept alongside this branch's peptide:deduplicate and fragment:query_spectrum parameters). Also documents the evidence_spectra parameter of postProcessHits_, which Doxygen_Warning_test flagged. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01UGKGwMtvsf72yELV4xNmAQ
…rences The references from develop (refreshed there for #10357 and #10358) lack the search-parameter entries this branch writes: scoring:method, scoring:method_resolved, scoring:fragment_charges, scoring:fragment_charges_resolved, scoring:mass_error_sd, fragment:max_charge, fragment:query_spectrum, peptide:deduplicate and annotate:local_fragment_evidence; peptide:clip_nterm_methionine moves to the position this branch writes it at. Every identification, score and annotation line is unchanged, so only these UserParam lines are added to ProSE_1_out (also used by the multi-file and chunked tests), ProSE_2_out, ProSE_4_out and ProSE_10_out. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01UGKGwMtvsf72yELV4xNmAQ
Split out of #10335, based on develop
2e82a31b966e59c595a4b1e6e29a3fc3abd67bc2.ProSE's jumping 100-Da peak filter scales the last window's quota by its observed width. A short final window can therefore retain zero peaks, even when it contains a strong fragment; a singleton spectrum can become empty.
This PR adds
peaks:window_type=auto. For fragment tolerances ≤0.1 Da or ≤100 ppm it retains the fullpeaks:window_topquota in the final window. Low-resolution auto keeps the existing filter.jumprestores legacy filtering at every resolution;jump_fullexplicitly uses the full quota everywhere. The existing global peak cap still applies.Selection preserves integer, float and string data arrays and resolves intensity ties by original peak order. All three preprocessing call sites use the option; requested/resolved modes are recorded in search parameters. Tool documentation and CHANGELOG are updated. No public method signatures or Python bindings change.
Local validation
Built the changed ProSEAlgorithm and current FragmentIndex, HyperScore and TheoreticalSpectrumGenerator sources with GCC 13.3, C++23 and OpenMP. Linked unchanged support code from official pyOpenMS
3.6.0.dev20260930(reports3.6.0-pre-nightly-2026-09-29, revision55f7bdb). This is a targeted source build, not a full clean OpenMS build.ProSEAlgorithm_test: all 34 sections pass.git diff --checkpasses.Also ran the inputs/settings of TOPP ProSE tests 1, 2, 4 and 10 through the source-built algorithm harness, with both auto and legacy filtering. Peptide sequences and scores are unchanged. Updated their idXML references for the two mode parameters and six explained-intensity fractions affected by the additional retained peaks. Parsed output structures and remaining numeric annotations match the references (runtime paths/dates and the existing fragment-annotation whitelist excluded). This does not claim a full TOPP executable build.
Exact tested source tree:
6a5da7c98200f333ad29074ee4d80f1566149f35.Earlier paired benchmark evidence
The isolated filter was evaluated in #10335 on 20 measurements, 8,000 MS2 each, across seven acquisition groups. Percolator 3.09.0, seeds 1/42/137, per-file q≤0.01. Changes in mean accepted PSMs:
Worst individual loss: −1.16% (timsTOF 50 min). All six low-resolution PINs and their seed results were unchanged. These are identification-yield comparisons, not proof of true FDR or absence of regressions. The full benchmark matrix was not rerun on this rebased extraction. Its baseline already contained the earlier auto-scoring changes; the comparison changed only the window filter.
Complete pinned protocol and benchmark manifest · Public reproduction ZIP
The bundle contains public dataset URLs/checksums, sampling code, FASTA construction, exact historical source patches/parameters and expected per-seed counts. To repeat the filter comparison, build
baselineandwindow, then use thebroad_benchmark:*:prose_autoandnative_gap:*:window_fixedjobs listed byreproduce.py list. Historical experiment sources are pinned separately from this extraction.Reproduce this PR's targeted local build and tests
On Linux x86_64 with g++-13, make, git, curl, Python 3.12, unzip and the required runtime libraries:
The original harness defines additional targets for #10335; only the target above is needed for this extraction.
Summary by CodeRabbit
Bug Fixes
New Features
auto,jump, andjump_full.autoselects filtering based on fragment tolerance;jump_fullretains the full peak quota in each window.Documentation