Skip to content

Explore results: sample correlation heatmap - #154

Open
t0mdavid-m wants to merge 1 commit into
mainfrom
claude/project-thread-8vpouw
Open

t0mdavid-m wants to merge 1 commit into
mainfrom
claude/project-thread-8vpouw

Conversation

@t0mdavid-m

Copy link
Copy Markdown
Member

Requested by Tom · project thread

What

Explore results gets a new Sample correlation component (group Quantification). It is a clustered heatmap of the Pearson correlation between the log2 protein abundances of every two samples, with the group bar on top. Replicates of one group should cluster together. A sample that doesn't, or a run that failed, stands out.

  • Each pair uses the proteins measured in both samples. The caption gives the median number of proteins per pair, and a pair sharing fewer than 10 proteins is left empty.
  • It uses the measured abundances, not the group comparison's table, because values filled in for missing ones would make samples look more alike than they are. Normalization doesn't change a Pearson correlation of log values.
  • A sample whose median correlation is 0.05 or more below the median of all samples is named under the plot as one to check. Otherwise the caption gives the median and lowest correlation.
  • The component is part of the Quality control view and can be added to any view of the user's own. It covers the whole experiment (EXPERIMENT_WIDE) and needs quantification plus two or more samples (NEEDS), like the heatmaps.

Sample correlation

Hovering the heatmap

The screenshots show the six example yeast/UPS2 files, quantified with match between runs.

How

  • src/common/sample_correlation.py (Streamlit-free) has sample_correlation, shared_proteins, median_correlation, median_shared_proteins and least_similar.
  • src/viewer/panels/sample_correlation.py draws it with openms-insight's ClusteredHeatmap, with Viridis colours and r as the intensity.
  • The group colours of the clustered heatmaps moved into heatmap_clustered.group_colors(), so both heatmaps colour a group the same way.

Checks

  • pytest test_gui.py tests/: 978 passed, 3 skipped. This includes the new tests/test_sample_correlation.py, and the catalog expectations in tests/test_viewer_analyses.py are updated for the new component.
  • pylint --errors-only is clean on the changed files.
  • Rendered in Chromium against a run of the six example files.

Generated by Claude Code

A clustered heatmap of the Pearson correlation between every two samples'
log2 protein abundances, over the proteins measured in both, before missing
values are filled in. Samples whose median correlation is well below the
others' are named under it. Part of the Quality control view and available
to every view of the user's own; computed over the whole experiment.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FkEGekouGeZB1Ft14Yiqvx
@t0mdavid-m t0mdavid-m self-assigned this Nov 13, 2026
@coderabbitai

coderabbitai Bot commented Nov 13, 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: 4a161820-609d-4a70-b7f5-ceee18b1bd4a
  • 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