Skip to content

Say under Precursor mass error whether the search window fit, with a start to search again - #262

Open
t0mdavid-m wants to merge 6 commits into
mainfrom
claude/project-thread-dm69w3-tolerance
Open

t0mdavid-m wants to merge 6 commits into
mainfrom
claude/project-thread-dm69w3-tolerance

Conversation

@t0mdavid-m

Copy link
Copy Markdown
Member

Requested by Tom · project thread

Needs OpenMS/streamlit-template#687 (merged in here as "Merge OpenMS/streamlit-template branch claude/project-thread-dm69w3-tolerance").

What it does

Under Precursor mass error (Quality control view), the Viewer now says whether the precursor window of the run's search fit the errors of its PSMs: off-centre, cut off at the edge, or wider than needed. Each finding has a Search again with ±N ppm button, which opens Describe experiment with the run's files and settings and that window ("These are the settings of the run Run 1, with a precursor window of −20 / +20 ppm").

  • src/viewer/precursor_window_source.py: the ProSE precursor window of the run (label-free or TMT instance, ppm only; a Da window or a run searched before ProSE gets no findings), whether calibration was on, and the params.json changes for another window.
  • src/viewer/panels/qc.py: window_check under the plot, from the target PSMs after the FDR filter and the template's window_findings.
  • src/viewer/history_ui.py: start_again takes changes on top of the run's settings.

A run whose search calibrated its windows (Search:calibration:enabled) is not told its window is too wide, since ProSE narrowed it itself. Nothing is drawn when the window fits.

Screenshots (the demo run with the window set to ±50 ppm)

Light Dark
light dark

The button was checked in the running app: it opens Describe experiment with lower and upper precursor tolerance set to 20 ppm.

Tests

tests/test_precursor_window_source.py (5 tests); pytest test_gui.py tests/: 1674 passed, 20 skipped. pylint (errors only) clean.


Generated by Claude Code

window_findings() in the precursor mass error library module compares the
precursor errors of the target matches with the window the search used:
off-centre (median beyond a third of its side), cut off at the edge (more
than 2 % in its outer tenth) or wider than needed (the errors need less
than half of it), each with the window to search again with. A narrower
window is only offered when the errors are clean.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FkEGepShSG5cNRTqoCXFo1
A heavy tail of correct matches was cut off by a window from the robust
spread (a real run: ±8 ppm needed by the spread, 1 % of errors beyond 14 ppm).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FkEGepShSG5cNRTqoCXFo1
…rrors

The run's ProSE precursor window (ppm) is compared with the precursor errors
of the target PSMs after the FDR filter: off-centre, cut off at the edge or
wider than needed (not reported when the search calibrated its windows
itself). Each finding offers Search again with the suggested window, which
opens Describe experiment with the run's files and settings and that window
(start_again takes changes on top).

Screenshots in pr-media/ for the pull request; removed in the next commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FkEGepShSG5cNRTqoCXFo1
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FkEGepShSG5cNRTqoCXFo1
@coderabbitai

coderabbitai Bot commented Dec 5, 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: 4b5f24c4-66cc-4a86-a064-d66365bde105
  • 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

@t0mdavid-m t0mdavid-m self-assigned this Dec 5, 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