Skip to content

Sample Signal by Plate: toggle plate median centring - #53

Merged
ypriverol merged 1 commit into
fix/qc-lod-summary-clarityfrom
feat/plate-signal-correction-toggle
Oct 8, 2026
Merged

ypriverol merged 1 commit into
fix/qc-lod-summary-clarityfrom
feat/plate-signal-correction-toggle

Conversation

@ypriverol

Copy link
Copy Markdown
Contributor

Closes #49. Stacked on #52: it targets #52's branch, so merge #52 first; GitHub will then retarget this PR to main.

The screenshot in #49 is PAD000009 again: plate medians −0.23 and −0.14.

Change

  • Toggle: two buttons switch the "Sample Signal by Plate" boxes between As deposited and Plate-centred, where each assay's median on each plate is moved to its overall median. pyprideap applies no plate correction of its own, so the first view is the deposited data.
  • Residual check: centring aligns the plate medians by construction, so aligned boxes alone don't show anything. The x-axis caption gives the share of PC1 explained by plate in each view, which is what reveals residual batch effects. The summary table gains an "After plate median centring (PC1)" row.
  • Help text: explains this and warns that, when study groups are confined to single plates, centring also removes real biology.

On real data (PC1 explained by plate)

as deposited plate-centred
PAD000009 4% 0%
PAD000001 44% 1%
PAD000008 32% 1%
PAD000021 (31 plates) 17% 1%
PAD000002 34% 10%: plate structure remains after centring

Tests

  • New tests check that centring removes a constant plate offset, and cover the toggle buttons, their visibility arrays and the PC1 caption.
  • With CI's versions: 199 passed; ruff and mypy are clean.

Issue #49: the plot showed only the deposited values. Two buttons now
switch between the deposited values and plate median centring (each
assay's median on each plate moved to its overall median). Centring aligns
the plate medians by construction, so the x-axis caption gives the share
of PC1 explained by plate in each view as the residual check; the summary
table adds the PC1 figure after centring.

PC1 explained by plate, deposited -> centred: PAD000009 4% -> 0%,
PAD000001 44% -> 1%, PAD000008 32% -> 1%, PAD000021 17% -> 1%,
PAD000002 34% -> 10% (residual structure beyond an offset).
@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing

@coderabbitai

coderabbitai Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 48 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: da01b8c2-995e-4f68-82eb-c444e4263ba6
📥 Commits

Reviewing files that changed from the base of the PR and between f867a29 and b8f1fd3.

📒 Files selected for processing (4)
  • src/pyprideap/viz/qc/compute.py
  • src/pyprideap/viz/qc/render.py
  • src/pyprideap/viz/qc/report.py
  • tests/test_qc_pipeline.py
  • Autopilot · 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.

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.

Toggle Plate Correction in Sample Signal by Plate plot

1 participant