Repository navigation
fix(mbr): pad 3D second-pass traces for quantification; keep pad points outside the f32 window bound - #231
Conversation
The second pass of match-between-runs applied the quantification trace pad (extract::TracePad::for_quant) only to runs whose spectra carry 1/K0, and printed the missing-pad warning only there. On 3D data the narrow second-pass RT window clipped quant's fixed integration window of an apex near its edge (ProteoBench Astral, 0.8.0: 2-29% of the A and 90-91% of the B quantities over fewer than 7 samples). The pad now applies to every second-pass run, under a fixed quant integration window and extract.emit_rt_window, with the warning when the latter is off. This changes the 3D second-pass chromatograms and quantities on purpose and breaks the 3D byte-identity of those two artifacts; psms_extracted, features and the scored tables are those of the unpadded table. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The features stage cuts a padded chromatogram table back to the RT window in f32 (chromatograms::window_span), while extract decides in f64 which hits are inside. A pad point just outside rt_lo or rt_hi whose RT rounds onto the f32 bound was read back as inside the window, so a few feature rows differed from the unpadded extraction (ProteoBench Astral second pass: 38 of 814,524 rows over six runs), and the classifier then saw different training data. Such a point is now stored one f32 step outside the bound. Without a pad nothing changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
diaPASEF validation of the boundary fix ( The fix removes the 4D leak on every seed: 23-55 second-pass feature rows per run differed on ProteoBench diaPASEF HYE (about 144,000 rows per run), 0-7 on the E. coli entrapment experiments. The first pass, the second-pass library,
Conclusion: no change in 4D sensitivity or FDR beyond seed noise. The one consistent movement is a +0.0018 species-weighted |eps| on diaPASEF from the reshuffled second-pass identifications. The branch is now merged with main (after #229, #230, #232, #238). The docs that #229 added described the trace pad as 4D-only; those passages and the 🤖 Generated with Claude Code |
Summary
Two related fixes to the second-pass trace pad. This changes default output and therefore needs an explicit decision against the 3D byte-identity rule, which is why it is a draft.
43a544b).run_experimentrequestedTracePad::for_quantonly when the spectra carry 1/K0. On 3D data the narrow second-pass RT window then truncated the fixed integration window: on ProteoBench Astral 2-35% of condition A and 73-94% of condition B quantities were integrated over fewer than 7 samples. The pad now applies to every second pass withextract.emit_rt_window, as it already did for 4D.16b7cb6).features::clip_rowscuts a padded trace back withchromatograms::window_span, which compares in f32, while extract decides in f64. A pad point just outside a bound whose RT rounds onto the f32 bound was read back as inside, so it leaked into a few feature rows (Astral 38 of 814,524). This leak already exists on main for 4D second passes (28-55 rows per run on diaPASEF). A pad point that would round inside is now stored one f32 step outside.Measured
features,psms_competed,scored_combinedand every per-runscored.parquetare byte-identical to main. Only second-pass chromatograms and quantities change. Clipped integrations go to 0. ProteoBench Astral species-weighted |eps| improves by 0.011-0.019 with better CV and human SD on every seed (removal of a uniform condition offset, not an accuracy gain in the narrow sense); AIF, Low Input and diaPASEF quantification are unchanged within noise.Before merging
16b7cb6out if 4D should wait.🤖 Generated with Claude Code