Repository navigation
Fix out-of-bounds reads, merge window, peak fraction and R package installation in MetaProSIP - #2
Merged
Conversation
timosachsenberg
marked this pull request as ready for review
December 2, 2026 11:23
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 17 minutes. View limit details
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. |
1 of 2 tasks
…stallation Bugs found in review of the move (OpenMS-MetaProSIP#1); all predate it: - apex neighbours: max_trace_int_idx < size - i wrapped when i > size, so the guard passed and read past mono_trace (a feature without a convex hull leaves one trace point) - merge window: after the loop over [low, high), the coefficient at high, the first one beyond the window, was added as well (two places); abundances are now the sum over the window only - a feature whose identifications all have empty hit lists indexed an empty hit list; it is skipped - observed_peak_fraction compared the fraction of missing peaks; it is now the minimum fraction of observed peaks, as documented (same at the default 0.5), and an empty window has none - weight_merge_window must not be negative (the merge loops would start behind their end) - 18O with averagine pseudo-features: one isotopic pattern per oxygen was made, but the decomposition and the correlation use one per isotopic trace (two per oxygen, as for sequences), so the decomposition read past the patterns; the decomposition also no longer reads past a pattern or the pattern list - R: a missing package was installed from an http:// CRAN mirror after update.packages(); missing packages are now reported with an install hint - QC heat map: heatmap.2 needs at least 2x2, so one peptide or -heatmap_bins 1 gave no plot; those are drawn with image(); the PNG is at least 200 px high and the bin labels use the real bin bounds Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0149aXmZhZtnMkPBQ7zPTrXN
- TOPP_MetaProSIP_4: a feature whose only identification has no hits is skipped (results as in test 1) - TOPP_MetaProSIP_5: a negative weight_merge_window is rejected - TOPP_MetaProSIP_6/7: averagine pseudo-features for the unidentified MS2 spectra of the input, with 18O (read past the patterns before) and 13C labeling - CI uploads the outputs of failed tests as an artifact Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0149aXmZhZtnMkPBQ7zPTrXN
- MetaProSIP: the documentation URL of --help and the CTD points to this repository; the default of TOPPBase is the page in the OpenMS documentation, which no longer has one for MetaProSIP - tests: OPENMS_TOOL_REGISTRY_PATH inherited from ctest's environment is unset where the tests run without this build's registry (it would register MetaProSIP twice); the registry check is named TOPP_MetaProSIP_* so that ctest -R MetaProSIP selects it - CI: the cache key's branch name goes through env, not the script text - .gitattributes: git does not expand braces; CRLF patterns for .cmd/.bat fixed - README: --helphelp lists all parameters; nightly.yml comment on the cache Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0149aXmZhZtnMkPBQ7zPTrXN
With the coefficient beyond the merge window no longer added, the abundance of the 36.5 % incorporation of the test peptide drops from 146376 to 134085 (the dropped coefficient: 12291); the explained TIC fraction follows from it (0.831888 * (1432379 + 134085) / (1432379 + 146376) = 0.825412). INT 1 is unchanged: the coefficient after its window was zero. Only these two fields are updated, from the outputs of CI (artifact test-outputs-Linux-X64-g++ of run 46867742143). The other fields still match the references within FuzzyDiff's tolerance; the references date from 2019. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0149aXmZhZtnMkPBQ7zPTrXN
timosachsenberg
force-pushed
the
claude/admiring-tesla-n9a3lm-fixes
branch
from
December 2, 2026 14:46
9766b8e to
edb3a45
Compare
8 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes the bugs CodeRabbit found while reviewing the move (#1). They all predate the move:
MetaProSIP.cppthere is byte-identical to OpenMSdevelop. Stacked on #1; retarget tomainonce that is merged.max_trace_int_idx < mono_trace.size() - (Int)iwraps wheni > size(a feature without convex hull leaves one trace point), then reads pastmono_tracemax_trace_int_idx + i < mono_trace.size()[low, high)the coefficient athigh, the first one beyond the window, was added toogetHits()[0]of an empty listobserved_peak_fraction("fraction of observed/expected peaks") was compared with the fraction of missing peaksweight_merge_windowmade the merge loops start behind their endsetMinFloat_(..., 0.0)-use_averagine_ids -labeling_element O: the averagine 18O generator made one pattern per oxygen (step 100/n), but decomposition and correlation use one per isotopic trace (2n, as the sequence-based 18O generator does), so the decomposition readpatterns[n..2n-1]past the end, and the correlation mislabelled the rateshttp://cran.rstudio.com/afterupdate.packages()install.packages(...)hint; nothing is installedheatmap.2needs at least 2×2 (one peptide, or-heatmap_bins 1), so no plot was madeimage(); PNG at least 200 px high; bin labels use the real bin bounds (no integer division)Not changed here: CodeRabbit's minor findings in
MetaProSIP.cpp(CSV column alignment, escaping in the QC HTML, MS2 blacklisting, charge-0 precursors, TIC fraction above 100 %, unused fit maps). They can follow separately.Tests
TOPP_MetaProSIP_4: input with a second feature whose only identification has no hits; the outputs must equal those of test 1.TOPP_MetaProSIP_5:-weight_merge_window -1is rejected.TOPP_MetaProSIP_6/_7:-use_averagine_idson the test data (11 MS2 spectra, so averagine pseudo-features are made), with-labeling_element O(the out-of-bounds path) and with 13C. These check that the run succeeds.Reference update (merge-window fix). The first CI run (Linux) passed every run test (including the new 18O averagine run, which read out of bounds before, and the empty-hit feature) and failed only the four CSV comparisons of tests 1 and 4 (test 4's outputs are byte-identical to test 1's). The outputs (artifact of the run) differ from the references in INT 2 of the 36.5 % incorporation, 146376 → 134085 (the dropped out-of-window coefficient, 12291), and in the TIC fraction that follows from it (0.831888 → 0.825412); INT 1 is unchanged. Only these two fields are updated in
MetaProSIP_1_output_{1,2}.csv; all other fields still match within FuzzyDiff's tolerance (checked against the CI outputs). The references date from 2019, so the remaining tiny differences (e.g. Global LR in the 5th digit, which depends only on the extracted intensities, not on anything changed here) are drift within the tolerance that predates this PR.Also in this PR: the correct minor findings of the second review of #1 (documentation URL of
--help/CTD points to this repository; inheritedOPENMS_TOOL_REGISTRY_PATHunset in the tests; registry test renamedTOPP_MetaProSIP_tool_registry_is_readable; branch name viaenvin CI;.gitattributespatterns; README--helphelp).Verification: CI runs on this branch via
workflow_dispatch(the workflow'spull_requesttrigger only covers PRs intomain). First run (on 479d938): https://github.com/OpenMS/OpenMS-MetaProSIP/actions/runs/46867742143. A run on the current head follows once that run's macOS/Windows core builds are cached.https://claude.ai/code/session_0149aXmZhZtnMkPBQ7zPTrXN
Generated by Claude Code