Skip to content

[FIX] FileInfo: count consensusXML peptide occurrences per map id - #10612

Merged
timosachsenberg merged 3 commits into
developfrom
claude/fileinfo-consensus-map-index-20261010
Oct 17, 2026
Merged

timosachsenberg merged 3 commits into
developfrom
claude/fileinfo-consensus-map-index-20261010

Conversation

@timosachsenberg

@timosachsenberg timosachsenberg commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Supersedes #10496 (by @okohlbacher): that branch lives on a fork this session cannot push to, and it conflicted with develop again. This PR carries its two commits unchanged plus a merge of current develop.

FileInfo sized the per-peptide occurrence vector by the number of maps but indexed it with the map id, so map ids not 0..n-1 (e.g. 1, 2 as in ConsensusID_3_input.consensusXML) wrote out of bounds and gave wrong "observed in N maps" counts; without a <mapList> it crashed.
Fix: key the occurrences by map id (map<UInt64, int>).
Test: TOPP_FileInfo_21 (map ids 1 and 2, two peptides seen in both maps) expects "observed in 2 maps: 2 (features: 4)"; without the fix FileInfo reports "1 maps: 2 (features: 2)".

Merge resolution:

FileInfo.cpp is unchanged relative to the version of #10496 that passed CI.


Generated by Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Corrected peptide and charge occurrence counts for consensusXML files when map IDs are not consecutive, preventing incorrect totals and out-of-bounds access.
  • Tests
    • Added coverage for consensusXML files with multiple maps and peptide identifications.

okohlbacher and others added 3 commits October 10, 2026 19:26
…er position

The per-peptide occurrence vector was sized by the number of column headers but
indexed by FeatureHandle::getMapIndex(), i.e. the map id, so map ids outside
0..n-1 (e.g. 1 and 2) wrote out of bounds and miscounted. TOPP_FileInfo_21
(map ids 1 and 2) reports "observed in 1 maps" without the fix.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Conflicts in CHANGELOG and src/tests/topp/CMakeLists.txt. The FileInfo entry moves out of the
ProteomicsLFQ section into the FileInfo section develop now has. TOPP_FileInfo_21 is registered
next to develop's TOPP_FileInfo_23.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01CEdeY5CKo9AtvssPRFr7MW
@coderabbitai

coderabbitai Bot commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a765520b-86cc-4482-af70-de8520280108
📥 Commits

Reviewing files that changed from the base of the PR and between d67b262 and 1d7b107.

📒 Files selected for processing: 5
  • CHANGELOG
  • src/openms/source/FORMAT/FileInfo.cpp
  • src/tests/topp/CMakeLists.txt
  • src/tests/topp/FileInfo_21_input.consensusXML
  • src/tests/topp/FileInfo_21_output.txt

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

📝 Walkthrough

FileInfo now stores peptide and charge occurrence counts by map ID instead of map position. A new TOPP test uses a ConsensusXML fixture with two maps and checks the generated report against reference output.

Changes: ConsensusXML occurrence counting

Layer / File(s) Summary
Map-ID-based occurrence counting and regression test
src/openms/source/FORMAT/FileInfo.cpp, src/tests/topp/CMakeLists.txt, src/tests/topp/FileInfo_21_input.consensusXML, src/tests/topp/FileInfo_21_output.txt, CHANGELOG
FileInfo stores and aggregates counts by map ID. The new fixture and reference output check the report for a file with two maps. The changelog describes the change.

Suggested reviewers: cbielow

Priority: ⬇️ Low

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 1d7b1

The regression test covers nonconsecutive map IDs and catches the prior counting failure. No actionable merge-blocking risk is established.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (4 skipped: 4 … Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: FileInfo now counts consensusXML peptide occurrences by map ID.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (4 skipped: 4 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

  • Fix all pre-merge checks with AI
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

A rabbit counts each map by name
No skipped numbers break the game
Two maps hop into the view
Their counts come out correct and true
The changelog joins the burrow crew

Comment @coderabbitai help to get the list of available commands.

@timosachsenberg
timosachsenberg merged commit f1eeb20 into develop Oct 17, 2026
33 checks passed
@timosachsenberg
timosachsenberg deleted the claude/fileinfo-consensus-map-index-20261010 branch October 17, 2026 14:51
timosachsenberg pushed a commit that referenced this pull request Oct 19, 2026
…#10301, #10611, #10606, #10608, #10609, #10617, #10610, #10578 ProSE Percolator rescoring, #10628)

Only CHANGELOG conflicted; both entries are kept. Develop's changes to FalseDiscoveryRate,
IDScoreGetterSetter, ConsensusMapMergerAlgorithm, FileInfo and ProSE work on the established
classes, which this branch keeps as they are.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01B51nRFoHvZuVXD7cT8XZav
timosachsenberg pushed a commit that referenced this pull request Oct 19, 2026
#10612, #10301, #10578 ProSE, #10628)

Develop's changes to the map-level identification code are ported to identification data:

- FalseDiscoveryRate::applyBasicPeptideLevel(ConsensusMap&) (#10617): in the scope, an identification
  keeps its best match and the matches tied with it whose peptide has an FDR; the others are removed
  (they would keep their search score under the FDR score type). Without decoys it keeps only targets,
  and nothing if its best match is not a target, as before. The best match is the first of the best
  score, as develop's sort makes it; q-values on a map were already lower-is-better (the FDR score
  definition). Develop's two test sections are rewritten for identification data.
- ConsensusMapMergerAlgorithm::mergeAllIDRuns() (#10618) throws Exception::MissingInformation for a
  map without runs. Identification data has no identification without its run, so the test uses a
  map without identifications.
- FileInfo (#10612) counts the occurrences per map id on the linked identifications (auto-merged).
- IsobaricWorkflow_hyperscore_peptide_out.consensusXML (#10617): one identification whose best match
  is a decoy loses its matches, as on develop; develop leaves it the score type of the search
  (hyperscore, higher is better), identification data the score type of its run (peptide q-value).
  Features, matches and values are the same as develop's.
- FeatureFinderIdentificationAlgorithm_test (#10628): the peptide identifications of the new section
  have a score type and scores, which the conversion to identification data needs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01B51nRFoHvZuVXD7cT8XZav
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants