Repository navigation
[FIX,TEST] ProteomicsLFQ: warn instead of asserting on a fraction without features (#10310) - #10315
Conversation
…hout features (#10310) A fraction in which no run has a feature gives the linker only empty maps. That happens when no identification of the fraction's runs passes the upstream FDR filter, as in the quantms BSA test with Sage, where Percolator keeps no PSM in any run of fraction 1. Until #9790 this crashed QTClusterFinder::run_() (massrange.front() on an empty vector, the segfault reported in #10310; 3.5.0 has it too). Since then linking returns an empty consensus map, but ProteomicsLFQ still asserted that it is not empty, so Debug builds aborted on the same input. The fraction now contributes no quantities and a warning names it; the other fractions are quantified as before. FeatureGroupingAlgorithmQT_test covers the call ProteomicsLFQ makes (use_identifications=true) on empty maps; builds before #9790 segfault on it. TOPP_ProteomicsLFQ_empty_fraction runs ProteomicsLFQ with a fraction without identifications (the 2026-07-02 nightly segfaults on it, the Debug build of develop aborted on the assertion) and compares the MSstats output of the remaining fraction, which matches the 2026-09-27 Release nightly byte for byte. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01H8edsjvHPkbzHmRd7Foszp
|
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 ignored due to path filters (1)
📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review. 📝 WalkthroughWalkthroughProteomicsLFQ now handles fractions that produce no consensus features without asserting. It logs a warning that identifies the fraction and run count. Regression tests cover empty feature maps and empty-fraction output. ChangesEmpty-fraction handling
Suggested reviewers: Priority: ⬇️ Low Change: Bug fix Merge Risk: ⚪ Minimal · up to An empty fraction contributes no quantities while the other fractions retain their output. No material mergeability risk is established. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches 💡 2📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
🛠️ Fix failing CI checks 💡
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 fraction's flow Comment |
…nnon-pqiddz Resolves the CHANGELOG conflict with #10307: both Robustness entries are kept. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01H8edsjvHPkbzHmRd7Foszp
Description
Follow-up to #10310 (segfault in
QTClusterFinderduring ProteomicsLFQ linking with Sage identifications).Cause of the reported crash. Reproduced with the reporter's build (
3.6.0-pre-nightly-2026-07-02, 33ebe49) on the quantms BSA test data with Sage. Percolator (-score:fdr 0.1) keeps no PSM in any run of fraction 1, so feature detection finds nothing and the QT linker receives only empty maps.QTClusterFinder::run_()then calledmassrange.front()on an empty vector: gdb shows frame#0reading a double from address 0 under#1 QTClusterFinder::run_<FeatureMap>and#2 FeatureGroupingAlgorithmQT::group_<FeatureMap>, the stack in the issue. 3.5.0 has the same bug. #9790 fixed it on develop on 2026-07-24; the 2026-09-27 nightly runs the same inputs to completion.What this PR changes.
ProteomicsLFQ:link_()still asserted! consensus_fraction.empty(), so Debug builds aborted on the same input (ProteomicsLFQ.cpp:756: ... Assertion '! consensus_fraction.empty()' failed). The assertion is removed.quantifyFraction_()now warns when a fraction yields no consensus features, naming the fraction and its number of runs. The other fractions are quantified as before.FeatureGroupingAlgorithmQT_test: new section for the call ProteomicsLFQ makes,group()withuse_identifications=trueon three empty feature maps. It checks the empty result and that protein and unassigned peptide IDs survive postprocessing. The same code segfaults against the 2026-07-02 library.TOPP_ProteomicsLFQ_empty_fraction(+_out_1): BSA1 and BSA2 with both fractions; fraction 2 has no identifications. The newProteomicsLFQ_empty_fraction_BSA1_F2.idXMLis a copy of the existingBSA2_F2_empty.idXMLpointing at BSA1_F2. The test requires the warning and compares the MSstats output of fraction 1 with a reference. The 2026-07-02 nightly segfaults on this test and the Debug build of develop aborts; the reference is byte-identical to the output of the 2026-09-27 Release nightly.No library code changes.
Checklist
-D_GLIBCXX_ASSERTIONS:FeatureGroupingAlgorithmQT_test,QTClusterFinder_testand all 92TOPP_ProteomicsLFQ_*tests; the full suite was not run)🤖 Generated with Claude Code
https://claude.ai/code/session_01H8edsjvHPkbzHmRd7Foszp
Generated by Claude Code
Summary by CodeRabbit