Skip to content

PSM tables: show modifications as labels, ProForma or OpenMS; ProForma in exports - #48

Open
t0mdavid-m wants to merge 1 commit into
mainfrom
claude/parity-mod-display
Open

t0mdavid-m wants to merge 1 commit into
mainfrom
claude/parity-mod-display

Conversation

@t0mdavid-m

Copy link
Copy Markdown
Member

Before: the PSM tables on Database Search, Rescoring and Filtered PSMs show the raw OpenMS string, e.g. .(Acetyl)M(Oxidation)DNFES(Phospho)TAEGNLSIGNK. The PSM downloads carry only that string as well.

After: a Modifications switch above each PSM table offers three views.

  • Labels (default) shows ac-M(ox)DNFES(ph)TAEGNLSIGNK.
  • ProForma shows [Acetyl]-M[Oxidation]DNFES[Phospho]TAEGNLSIGNK.
  • OpenMS shows the original string.

The choice carries across the three pages and survives navigating away. Row selection still drives the spectrum and sequence views. The PSM and fragment-ion TSV exports gain a proforma column next to the OpenMS sequence.

This is ProSE parity item R10 (modification display switch).

How:

  • src/common/peptide_format.py builds both forms with pyOpenMS AASequence, so any modification OpenMS knows works.
    • It uses Unimod names, with short labels for common ones (ox, ph, cam, ac, de, tmt, …).
    • Terminal mods are written as X- and -X.
    • A mod without a Unimod name falls back to its signed mass shift.
    • A string pyOpenMS can't read is shown unchanged.
  • src/common/sequence_display.py handles the non-OpenMS views.
    • It reads the run's cached PSM table data and builds a second insight Table cache with the formatted Sequence column. The links, row ids, sort and columns are copied from the original's manifest.
    • That cache is built once per run and view, and replaced when a new run regenerates the base table.
    • Existing results get the switch without re-running the workflow.

Validation:

  • tests/test_peptide_format.py has 8 tests: terminal mods, short labels, mass-only mods and pass-through.
  • tests/test_sequence_display.py has 2 tests: the variant cache's data and manifest, and its rebuild after a new run.
  • test_result_exports now checks the proforma column.
  • pytest tests/ passed 123 tests.
  • pylint --errors-only reports only the usual E0611 false positives on pyopenms imports (compiled module).
  • I rendered Filtered PSMs in Chromium with acetyl, oxidation and phospho PSMs and switched through all three views. The OpenMS choice was still selected after going to Rescoring and back.

Generated by Claude Code

… ProForma in exports

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

coderabbitai Bot commented Oct 26, 2026

Copy link
Copy Markdown

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: a74a6e61-269d-43d9-80dc-8cf8411cf247
  • 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

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

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