Skip to content

Fragment ion coverage map of the picked proteoform - #329

Open
t0mdavid-m wants to merge 8 commits into
developfrom
claude/project-thread-wbyk3x
Open

t0mdavid-m wants to merge 8 commits into
developfrom
claude/project-thread-wbyk3x

Conversation

@t0mdavid-m

@t0mdavid-m t0mdavid-m commented Nov 27, 2026 •

Copy link
Copy Markdown
Member

Requested by Tom · project thread

What it does

A new Viewer component, Fragment ion coverage, draws the fragment ions that FLASHAnnotator matched in the spectrum of the picked proteoform on that proteoform's sequence.

  • There is one track per ion type (a, b, c, x, y, z, z+1, z+2). Internal fragments get a track of their own, and every track shows its own coverage.
  • Every fragment is a bar over the residues it holds. A terminal ion covers its whole prefix (a, b, c) or suffix (x, y, z). An internal fragment covers the stretch between its two cleavages.
  • A fragment seen at several charges is one bar, coloured by its number of charge states (1, 2, 3, 4+, in shades of the matched-fragment blue). Its label names the modifications it holds, and a note below the legend explains what the bars cover.
  • The map follows the proteoform picked in a protein or proteoform table. With nothing picked, it asks for a pick. Results from before FLASHAnnotator show a note in its place.
  • The ready-made Native and Lysate views show it below the sequence view. Under Customize views it is in the Sequence group.
  • It uses the shared panel src/viz/identification/sequence_coverage.py from the template sync and openms-insight's SequenceCoverage. With an openms-insight that lacks the component, the cell asks for a newer one.

The rows are built in src/render/fragment_coverage.py (Streamlit-free) from the annotated_fragments already stored in sequence_data, and the component in render.py::_fragment_coverage. Its cache id includes that module.

Depends on

  1. Sequence coverage map and nucleic acid sequences in SequenceView t0mdavid-m/OpenMS-Insight#151, the SequenceCoverage component, to be released as 0.7.10. requirements.txt stays at openms-insight==0.7.9 until 0.7.10 is on PyPI. Merging waits for that release and the pin bump.
  2. Visualization library: sequence coverage, fragment spectrum and table, feature XIC, condition scatter streamlit-template#636, the shared panel, which is already in develop through the template sync.

Tested

  • pytest tests/: all passed.
    • tests/test_fragment_coverage.py has nine new tests: the proteoform's residues, prefix and suffix spans, charge-state counts, modification labels, a series of growing prefixes, the schema, and every bar of the example lysate run lying on its proteoform.
  • pylint --errors-only is clean on the changed files.
  • The running app was checked with openms-insight from the Choose a UniProt proteome as the protein database on Describe experiment #151 branch on the example lysate run, picking DBHA_ECOLI, in the light and dark themes.

Screenshots and video

GitHub's API cannot upload media, so the screenshots (light and dark theme) and the video are attached in the project thread.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FkEGeqARB7RGFuMMYStfGR

…, feature XIC, condition scatter

Panels NASE-weis draws, written against column contracts like the others:
the matches of a reference drawn under it per group, a spectrum whose
assigned peaks are coloured by ion series with the fragment table linked to
it, a feature's XIC with its bounds, and one condition's means against
another's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FkEGekgDRB78HXZAqDXxJN
deploy.desktop_app.same_openms_as_images: false skips the check that the
desktop app and the full Docker images name the same OpenMS, for an app
pinned to a nightly commit its images cannot clone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FkEGekgDRB78HXZAqDXxJN
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FkEGekgDRB78HXZAqDXxJN
The Lysate view shows, below the PrSMs, where each proteoform of the
protein picked in the protein table lies on its sequence: one bar per
proteoform, coloured by its PrSMs, with its modifications marked. A
click on a bar picks the proteoform in the proteoform table and back.
The component is offered in Customize views (Sequence group) and needs
an openms-insight with SequenceCoverage; older builds show a note.

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

coderabbitai Bot commented Nov 27, 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: fee2f3dc-aab8-4192-becd-4c0307ed9c99
  • 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

Copy link
Copy Markdown
Member Author

The pytest failure is not caused by this PR's own code. Two template tests come in with the template merge, and both need openms-insight 0.7.10:

  • tests/test_viz_nucleic_acid_panels.py::test_fragment_spectrum_rows_and_component fails with KeyError: 'colorColumn'. It needs LinePlot color_column.
  • tests/test_viz_nucleic_acid_panels.py::test_sequence_coverage_rows_and_component fails because there is no openms_insight.SequenceCoverage.

CI installs the pinned 0.7.9. The rest of the suite passes: 1691 tests.

What blocks the fix: openms-insight 0.7.10 (t0mdavid-m/OpenMS-Insight#151) is not on PyPI yet. Once it is published, bumping the pin to openms-insight==0.7.10 makes these tests pass.


Generated by Claude Code

The coverage map now shows the fragment ions FLASHAnnotator matched in
the picked proteoform's spectrum instead of the proteoforms on the
protein: one track per ion type, each terminal ion at the residue next
to the bond it was cleaved at, internal fragments over the residues
they hold, coloured by the number of charge states. It follows the
proteoform picked in a protein or proteoform table and is part of the
Native and Lysate views.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FkEGeqARB7RGFuMMYStfGR
@t0mdavid-m t0mdavid-m changed the title Sequence coverage map of the picked protein Fragment ion coverage map of the picked proteoform Nov 27, 2026
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