Skip to content

desktop: visDIA shows the CV of the peptides you list (#374) - #409

Merged
RobbinBouwmeester merged 5 commits into
mainfrom
feat/visdia-subset-cv
Dec 1, 2026
Merged

RobbinBouwmeester merged 5 commits into
mainfrom
feat/visdia-subset-cv

Conversation

@RobbinBouwmeester

Copy link
Copy Markdown
Member

For #374 (show the CV for a subset of peptides the user is interested in, in visDIA).

visDIA is its own repository; the desktop application installs it from a pinned commit. The feature is in CompOmics/visDIA#17 (draft), and this PR moves the pin to that branch's commit e0b4bf2 and documents it. Move the pin to visDIA's merge commit once visDIA#17 is merged, before this leaves draft.

What the user sees

Open in visDIA -> Quant QC. Under "CVs within conditions" (experiments with two or more runs) a new card CVs of your peptides:

  • a text box: one entry per line (spaces, commas, semicolons, tabs also separate; a spreadsheet column pastes). Kept in the browser across reloads.
  • per condition: the list's precursors with a CV, their median CV and share at most 20%, next to the same for every precursor;
  • a figure: every precursor's CVs per condition as a grey violin, the list's precursors as dots (hover names them), their median as a bar;
  • a table, one row per matched precursor: entry, peptidoform/charge, protein group, and per condition CV% (values/runs) or "no CV"; then each entry that matched nothing as "not identified: no precursor accepted at precursor_q <= t matches it";
  • a badge "N precursors from k of n entries".

Quantity and CV

The card reuses the page's existing CV path (no second implementation): the toolbar's quantity, MaxLFQ precursor quantity by default in an experiment or each run's peptide_quant.quantity on the toggle; the toolbar's keys (accepted at precursor_q, or all quantified); the CV-needs toggle (a value in every run of the condition, or at least two values). CV = sample SD (n - 1) / mean of the linear quantities of the condition's runs with a value. The card's subtitle names the quantity. The recipe's quantity_normalised is not one of the viewer's sources (neither CV card reads it).

Conditions

CVs are per condition, from the page's Conditions card. Two changes there: the conditions now start from experiment.conditions of the manifest, i.e. what the user typed on the Search screen; and a run without a recorded input file is suggested from its run name (A_01, B_02 -> A, B) where it used to be a condition of its own (no CV at all). Edits in the card still win. A result whose conditions all have one run shows "No condition has two runs ... group the runs in the Conditions card".

Matching

Plain sequence: every peptidoform of it (modified or not, every charge). Peptidoform with modifications: that one. /2: one charge. No precursor match: taken as a protein (whole protein_group, a ; member, or a | part such as P12345 / NAME_HUMAN), giving every precursor of its groups. * and ? are wildcards. Case-insensitive.

Validation

  • visDIA: pytest tests 1473 passed, 21 skipped (real-data variables unset); ruff clean; new tests for parsing, every matching rule, subset CVs against numpy and against the whole-experiment CVs of the same rows, the answer function and the Dash callback.
  • Viewer run on a local finished six-run HYE experiment, driven with Playwright: conditions A and B from the run names; 6 entries gave 82 precursors from 4 of 6 entries; list median CV 14.8% / 15.2% against 16.3% / 16.0% over 58,763 / 52,479 precursors; the 2 unmatched entries shown as not identified; the list survived a reload.
  • A fresh install of env/console-visdia-requirements.txt resolved (duckdb 1.5.6, dash 4.5.2) and imports the new code; python ci/check_console_envs.py ok.
  • desktop: cargo fmt --check, cargo clippy --all-targets --locked -- -D warnings, cargo test --lib --locked (241 passed), python ci/check_desktop_ui.py, node ci/test_desktop_ui.mjs (40) all pass.
  • No engine change: only the requirement file the application compiles in, the changelog and desktop/README.md.

Not done

  • Selecting rows in the identification browser and sending them to the card (the grid is single-row selection; a larger change).
  • Protein-group CVs for a protein list: a protein expands to its precursors.
  • Existing installs see the visDIA environment as outdated and the Setup screen offers the update, as with every pin move.

🤖 Generated with Claude Code

RobbinBouwmeester and others added 4 commits December 1, 2026 09:28
Pin visDIA at e0b4bf2 (CompOmics/visDIA#17). Its Quant QC page gets a card
"CVs of your peptides": a pasted or typed list of sequences, peptidoforms
(with /z for one charge), protein accessions or entry names, with * and ?
wildcards; per condition each matched precursor's CV with the runs that
had a value, the list's median CV next to every precursor's, and entries
that matched nothing as not identified. It reuses the page's CVs (same
quantity, conditions, keys and rule). The viewer's conditions now start
from the manifest's experiment.conditions, and a run without a recorded
input is suggested from its name.

No engine output changes; only the requirement file the application
compiles in, its comment, the changelog and the desktop README.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Same tree as e0b4bf2, now on visDIA's main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ies)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@RobbinBouwmeester
RobbinBouwmeester marked this pull request as ready for review December 1, 2026 10:03
@RobbinBouwmeester
RobbinBouwmeester merged commit f90424f into main Dec 1, 2026
15 checks passed
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.

1 participant