Repository navigation
[FIX] FLASHDeconv: sort the signal-decoy exclusion list before searching it - #10697
Conversation
…ing it scoreAndFilterPeakGroups_ rebuilds excluded_masses_for_decoy_runs_ as mono + j * iso_distance for j in [-allowed_isotope_error, allowed_isotope_error] per target, which is unsorted as soon as allowed_isotope_error >= 1. isPeakGroupInExcludedMassForDecoyRuns_ uses std::upper_bound on it, so signal decoys that overlap a target could be kept. With the default (0) the list is already sorted and nothing changes. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ⬇️ Low Change: Bug fix · Severity of issue fixed: Low Merge Risk: ⚪ Minimal · up to
|
timosachsenberg
left a comment
There was a problem hiding this comment.
Looks good. isPeakGroupInExcludedMassForDecoyRuns_() binary-searches this list, and with allowed_isotope_error > 0 the offsets of neighbouring targets interleave, so it has to be sorted here, as prepareSignalDecoyExclusions_() already does. Thanks for the before/after counts: target rows unchanged, default settings byte-identical.
Generated by Claude Code
Fixes #10696.
In the signal-decoy run of
SpectralDeconvolution::scoreAndFilterPeakGroups_,excluded_masses_for_decoy_runs_is rebuilt asmono + j * iso_distancefor j in [-allowed_isotope_error, allowed_isotope_error] per target, which is unsorted as soon asallowed_isotope_error >= 1.isPeakGroupInExcludedMassForDecoyRuns_binary-searches it (std::upper_bound), so signal decoys overlapping a target could be kept.Fix: sort the list after building it, as
prepareSignalDecoyExclusions_already does.With
-FD:report_FDR -FD:allowed_isotope_error 1: 737 → 733 signal-decoy rows on a small top-down file, 24,672 → 24,667 on a HeLa bottom-up file; target rows unchanged. Default settings, with and without FDR, give byte-identical output. The 14 FLASHDeconv/TOPDOWN tests pass. (Measured on a FLASHDeconv build carrying this commit on top of other, output-neutral performance changes; the commit itself applies cleanly to develop.)🤖 Generated with Claude Code
Summary by CodeRabbit