Skip to content

[FIX] PEFFFile: keep variant descriptions and sequences paired - #10495

Merged
timosachsenberg merged 5 commits into
OpenMS:developfrom
okohlbacher:claude/peff-variant-pairs-20261010
Oct 15, 2026
Merged

timosachsenberg merged 5 commits into
OpenMS:developfrom
okohlbacher:claude/peff-variant-pairs-20261010

Conversation

@okohlbacher

@okohlbacher okohlbacher commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

PEFFEntry::getVariantSequences (and the reference branch of digestWithVariants) pushed the description before AASequence::fromString, so one unparsable variant left an orphan description and shifted every later pair.
Fix: push the sequence first, then the description. The new PEFFFile_test case (variants P3a, I5L, 2-3>aa, 6-7>KR) gets 4 descriptions for 2 sequences without it.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Fixed variant handling so unparsable variants are skipped along with their descriptions, keeping valid sequences and descriptions correctly paired.

okohlbacher and others added 2 commits October 10, 2026 19:11
… sequence cannot be parsed

Push the description only after AASequence::fromString succeeded, in
getVariantSequences (simple and complex) and the reference branch of
digestWithVariants.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Oct 10, 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: 33b1507f-2244-4a03-841a-700788048c49
📥 Commits

Reviewing files that changed from the base of the PR and between e7e9dbf and 80f3257.

📒 Files selected for processing: 1
  • CHANGELOG
🚧 Files skipped from review as they are similar to previous changes: 1
  • CHANGELOG

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

📝 Walkthrough

PEFF variant parsing now appends a description only after its corresponding sequence parses successfully. This applies to simple and complex variants and reference peptides in digestion. Regression tests cover valid and invalid variants. The changelog records the change.

Changes: PEFF variant description pairing

Layer / File(s) Summary
Keep parsed sequences and descriptions paired
src/openms/source/FORMAT/PEFFFile.cpp, src/tests/class_tests/openms/source/PEFFFile_test.cpp, CHANGELOG
Simple and complex variants, and reference peptides in digestion, append descriptions after successful sequence parsing. Regression tests cover valid and invalid variants. The changelog records that unparsable variants are skipped with their descriptions.

Suggested reviewers: timosachsenberg

Priority: ⬇️ Low

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 80f32

This change keeps PEFF variant descriptions aligned with their parsed sequences when a variant cannot be parsed. No merge-blocking risk was identified.

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 4 functions across 2 files. (1 skipped: 1 … 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 fix: preserving the pairing between PEFF variant descriptions and sequences.
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 4 functions across 2 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • 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

I’m a rabbit, hopping by,
With paired sequences stacked up high.
A skipped variant leaves no trace,
Its description stays in place.
Valid changes pass the test,
And PEFF parsing works its best.

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

okohlbacher and others added 3 commits October 12, 2026 13:48
develop added a block of entries right after "OpenMS Library:", where this
PR's entry was, so the two conflicted. Moving the entry two entries down
lets the PR merge cleanly; its text is unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_012GBvJZN8neGpv9RoUshwFL
@timosachsenberg
timosachsenberg merged commit 1108633 into OpenMS:develop Oct 15, 2026
6 of 8 checks passed
timosachsenberg pushed a commit that referenced this pull request Oct 15, 2026
timosachsenberg pushed a commit that referenced this pull request Oct 15, 2026
#10547)

Conflicts:
- FileConverter: develop no longer converts peaks to consensus maps
  (#10561); the native marking of unassigned identifications stays.
- ConversionHelper_test: develop's PeakMap conversion tests go with the
  conversion; this branch's identification section stays.
- MapAlignmentAlgorithmIdentification: #10576 removed better_. The map
  path takes the score direction from the run's primary score definition,
  and with use_feature_rt a feature without a passing identification is no
  alignment point (as #10576 does for peptide identifications).
- MapAlignmentAlgorithmIdentification_test: the #10576 section and the
  #10568 setReference() section build native map identifications. A map
  cannot mix score directions (the import rejects it), so the test expects
  that rejection and checks both directions separately, with an
  unidentified first feature.

MapAlignmentAlgorithmPoseClustering: develop's selectFeatures_() (#10561)
copied only the legacy identifications, while StablePairFinder here reads
the native ones through the feature links. It now uses the new
MapConversion::convert() overload for selected features, which keeps the
identification data of the selected features like the first-n overload.

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.

3 participants