Skip to content

Add a Samples page: PSMs, peptides and proteins per sample, by condition - #47

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

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

Conversation

@t0mdavid-m

Copy link
Copy Markdown
Member

Before: there is no per-sample view. To check whether one run underperformed, you have to open each file's PSM table or compare abundance columns by eye.

After: a new Samples page under Workflow Results shows each sample's target PSMs, peptides, identified proteins, and quantified proteins and peptides, grouped by the conditions set on the Configure page.

  • A bar chart is coloured by condition, with a selector for which count it shows.
  • An OpenMS-Insight table lists the samples.
  • A per-condition table gives the sample count and the mean of each count.
  • Samples without a condition appear as "Unassigned", with a link to Configure.

In TMT mode, each sample is a channel and the page shows the proteins quantified per channel. Identifications are per file, so the page points to the Overview page for those (#46).

This is ProSE parity item R9 (Samples tab).

How:

  • src/common/samples.py is Streamlit-free. It counts from what the run already wrote: the IDFilter idXMLs (top hit per spectrum, decoys left out, so counts are at the run's PSM FDR) and the ProteomicsLFQ CSV (intensity above 0).
  • The page caches on the group assignments and the result files' modification times.
  • The chart is Plotly, because openms-insight has no bar chart.

Validation:

  • tests/test_samples.py has 3 tests: decoy exclusion, condition ordering with missing and zero-intensity samples, and TMT channels with the condition summary.
  • pytest tests/ passed 117 tests.
  • pylint --errors-only is clean on the changed files.
  • I rendered the page in Chromium with six files in two conditions; the screenshots match the layout described above.

Note: #42, #43 and #46 also add lines to app.py's "Workflow Results" list. Whichever merges later needs main merged in.


Generated by Claude Code

@t0mdavid-m t0mdavid-m self-assigned this Oct 25, 2026
@coderabbitai

coderabbitai Bot commented Oct 25, 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: 9a7d05b8-e54a-49ae-be99-d892e2210fdc
  • 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.

t0mdavid-m commented Oct 25, 2026 •

Copy link
Copy Markdown
Member Author

test-nginx (simple, arm64) failed while the ingress-nginx controller was still being installed, before the app was deployed. kubectl wait ran right after the manifests were applied and returned error: no matching resources found, because the controller pods had only just been created (Pending, 0s old). The openms namespace was still empty. This is a race in the kind setup step, and this PR doesn't touch k8s or the Docker images. No fix exists yet.

Update: the one re-run passed, so all checks on this PR are now green.


Generated by Claude Code

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