Skip to content

Match fragments: compare the proteoforms tried against one mass list - #243

Open
t0mdavid-m wants to merge 4 commits into
developfrom
claude/project-thread-54ihjf
Open

t0mdavid-m wants to merge 4 commits into
developfrom
claude/project-thread-54ihjf

Conversation

@t0mdavid-m

Copy link
Copy Markdown
Member

What changes

Compare proteoforms is a new section below the sequence view on the Match fragments page.

You change the sequence, its modifications or the ion types in the view, then press Add this proteoform. Each proteoform you add becomes one row in a table:

  • Matched fragments (all, N-terminal, C-terminal)
  • Share of the bonds cleaved
  • Δ mass to the precursor, in Da and ppm
  • Theoretical mass, the tolerance used, and the proteoform as ProForma

★ marks the row with the most matched fragments; ties go to more cleavages, then to the smaller |Δ mass|. Adding the same proteoform at the same tolerance again replaces its row. Selected rows can be removed. The table belongs to the mass list: it is kept in <workspace>/fragment-matcher/hypotheses.json, and a new mass list starts an empty table.

The numbers come from the view itself. It writes the fragments it matched, together with the proteoform, to the fragment_matches selection, so the table always agrees with the view's own fragment table and "% Residue cleavage". This needs OpenMS-Insight #85 (set_fragment_matches_proteoform). The section is behind hasattr, so with an older openms-insight the page looks as before. Raise the pin once #85 is released.

The rows are built and stored by Streamlit-free functions in src/fragment_matcher.py (hypothesis, add_hypothesis, load_hypotheses, remove_hypotheses, best_hypothesis).

Screenshot and video

Scan 4268 of the lysate example (Load an example), with three proteoforms tried: HU-alpha as is, without the initiator Met, and without Met plus N-terminal acetylation. HU-alpha as is matches 82 fragments, 61% of the bonds, and is 0.4 ppm from the precursor.

compare

Video: compare-proteoforms.mp4

The media are committed in a8f9886 and removed in the next commit.

Checks

  • pytest tests/: 1028 passed, 3 skipped. New tests in tests/test_fragment_matcher.py cover the row taken from the view's matches, storage per mass list, replacing a row, removing rows, and the best row.
  • pylint --errors-only on the changed files: clean.
  • Rendered in headless Chromium with openms-insight built from Optimize Docker build cache by reordering JS component build #85.

Generated by Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FkEGeok3SERJh8beVS6Mfr
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FkEGeok3SERJh8beVS6Mfr
@t0mdavid-m t0mdavid-m self-assigned this Nov 9, 2026
@coderabbitai

coderabbitai Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ec989e01-2aa3-40f2-9ed4-83187d7cca68
  • 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

…ead-54ihjf

# Conflicts:
#	content/Tools/FragmentMatcher.py
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