Skip to content

Say whether the fragment tolerance fit, with a start to search again - #265

Open
t0mdavid-m wants to merge 15 commits into
mainfrom
claude/project-thread-dm69w3-fragtol
Open

t0mdavid-m wants to merge 15 commits into
mainfrom
claude/project-thread-dm69w3-fragtol

Conversation

@t0mdavid-m

Copy link
Copy Markdown
Member

Requested by Tom · project thread

Needs OpenMS/streamlit-template#694 (merged here as "Merge OpenMS/streamlit-template branch claude/project-thread-dm69w3-fragtol") and builds on #262 (the precursor window check and start_again(changes=..., note=...)); both merge first.

What it does

Under Precursor mass error on the Quality control view, a run now also says whether its fragment tolerance fit the fragment mass errors of its files (read from each file's exports/<file>_fragment_ions.tsv): off-centre, filling the tolerance, or wider than needed. Each finding lists the files when only some are affected, and its button Search again with ±N ppm fragments opens Describe experiment with the run's settings and that fragment tolerance (the follow-up note says so). Runs searched with a tolerance in Da, or without fragment exports, show nothing.

  • src/viewer/fragment_tolerance_source.py (Streamlit-free): the run's fragment tolerance in ppm, its fragment export files, the settings change for a new tolerance.
  • src/viewer/panels/qc.py: fragment_check() after the precursor window check.

Screenshots

The example run searched again with ±40 ppm fragments (its errors need about ±18 ppm):

Light Dark
light dark

The example run at ±20 ppm shows no finding, so the view is unchanged there. The button was checked: it opens Describe experiment with the fragment tolerance set to 18 ppm.

Tests

tests/test_fragment_tolerance_source.py (4 tests). Full suite: 1696 passed, 19 skipped; pylint clean.


Generated by Claude Code

claude and others added 14 commits December 5, 2026 06:45
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
Bumps [charset-normalizer](https://github.com/jawah/charset_normalizer) from 3.4.3 to 3.5.3.
- [Release notes](https://github.com/jawah/charset_normalizer/releases)
- [Changelog](https://github.com/jawah/charset_normalizer/blob/master/CHANGELOG.md)
- [Commits](jawah/charset_normalizer@3.4.3...3.5.3)

---
updated-dependencies:
- dependency-name: charset-normalizer
  dependency-version: 3.5.3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [pydeck](https://github.com/visgl/deck.gl) from 0.9.1 to 0.9.3.
- [Release notes](https://github.com/visgl/deck.gl/releases)
- [Changelog](https://github.com/visgl/deck.gl/blob/master/CHANGELOG.md)
- [Commits](https://github.com/visgl/deck.gl/commits)

---
updated-dependencies:
- dependency-name: pydeck
  dependency-version: 0.9.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [python-dateutil](https://github.com/dateutil/dateutil) from 2.9.0.post0 to 4.0.0.
- [Release notes](https://github.com/dateutil/dateutil/releases)
- [Changelog](https://github.com/dateutil/dateutil/blob/master/NEWS)
- [Commits](dateutil/dateutil@2.9.0.post0...4.0.0)

---
updated-dependencies:
- dependency-name: python-dateutil
  dependency-version: 4.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [click](https://github.com/pallets/click) from 8.1.8 to 8.5.1.
- [Release notes](https://github.com/pallets/click/releases)
- [Changelog](https://github.com/pallets/click/blob/main/CHANGES.md)
- [Commits](pallets/click@8.1.8...8.5.1)

---
updated-dependencies:
- dependency-name: click
  dependency-version: 8.5.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
tolerance_findings in the fragment errors module reads the matched
fragment errors of each file of a run and reports an off-centre median,
errors that fill the tolerance, or a tolerance more than twice what every
file needs, each with the tolerance to search again with. The spread is
measured with the median and median absolute deviation, since peaks
matched by chance spread evenly over the tolerance.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FkEGepShSG5cNRTqoCXFo1
…th a start to search again

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
@t0mdavid-m t0mdavid-m self-assigned this Dec 6, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FkEGepShSG5cNRTqoCXFo1
@coderabbitai

coderabbitai Bot commented Dec 6, 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: fa0fb700-a010-4ed0-83c9-b2086fa4748a
  • 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

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