Skip to content

PCA / t-SNE: colour by sample type, plate or study group - #57

Merged
ypriverol merged 1 commit into
fix/report-wording-48from
feat/colour-by-48
Oct 8, 2026
Merged

ypriverol merged 1 commit into
fix/report-wording-48from
feat/colour-by-48

Conversation

@ypriverol

@ypriverol ypriverol commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Closes #48 (items 1–3 in #56, item 4 answered on the issue).

Item 5 of #48. Stacked on #56 (stack: #52 → #53 → #55 → #56 → this).

PCA and t-SNE get a "Colour by" dropdown, listing only colourings that separate the samples:

  • Sample type, as today; or the QC flag when every sample has the same type;
  • Plate, when there are several plates;
  • Study group, when the SDRF or sample metadata defines one. SDRF design columns are named factor value[...]; control samples and unannotated samples are grey.

It works in both the full report and the split pages PRIDE embeds, and the "Show Labels" button still works.

This helps QC, not only interpretation: it shows whether the main structure follows plate, sample type or biology. On PAD000040, PC1 separates the two plates while the three glycemic groups are mixed, which shows directly that the plates aren't bridge-normalised. Study groups appear only when the SDRF declares them (6 public datasets today).

The correlation and expression heatmaps are unchanged. A group annotation strip there is more work and less readable; it can follow if wanted.

Tests

  • New tests cover which options are offered (plate, study group, controls in grey), dropping a sample type with a single value, and the dropdown's visibility arrays.
  • With CI's versions: 206 passed; ruff and mypy are clean.

Issue #48 item 5. Both projections get a "Colour by" dropdown with the
colourings that separate samples: sample type (or QC flag), plate when
there are several, and the study group when the SDRF or sample metadata
defines one (SDRF factor values named as such; controls and unannotated
samples in grey). Works in the full and the split report.

PAD000040: PC1 separates the two plates while the glycemic groups mix,
showing the plate effect directly.
@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 24 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: 23246905-8592-4e54-a5a1-280c1931edee
📥 Commits

Reviewing files that changed from the base of the PR and between 4ce00e0 and ffb027c.

📒 Files selected for processing (3)
  • src/pyprideap/viz/qc/compute.py
  • src/pyprideap/viz/qc/render.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.

@ypriverol
ypriverol added this pull request to stack #54 October 8, 2026 14:44
@ypriverol
ypriverol merged commit 06f715d into main Oct 8, 2026
7 checks passed
@ypriverol
ypriverol deleted the feat/colour-by-48 branch October 8, 2026 15:27
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.

QC report review: pre-analytical markers, caption order, LOD source choice, optional case/control colour

1 participant