Skip to content

Display raw sample intensities instead of log2-transformed values#25

Merged
t0mdavid-m merged 1 commit intomainfrom
claude/fix-protein-abundance-logging-TF9gY
Apr 29, 2026
Merged

Display raw sample intensities instead of log2-transformed values#25
t0mdavid-m merged 1 commit intomainfrom
claude/fix-protein-abundance-logging-TF9gY

Conversation

@t0mdavid-m
Copy link
Copy Markdown
Member

@t0mdavid-m t0mdavid-m commented Apr 29, 2026

Summary

Updated the abundance results page to display raw sample intensities in the bar chart instead of applying log2 transformation. This change simplifies the data visualization and provides users with the original intensity values.

Key Changes

  • Removed numpy import as it's no longer needed for log2 transformation
  • Simplified the intensity column creation to use raw values directly instead of applying np.log2(v + 1) transformation
  • Updated the bar chart column help text from "Sample intensities (log2 scale)" to "Raw sample intensities"
  • Removed the y_min=0 parameter from the BarChartColumn configuration

Implementation Details

The intensity values are now converted to a simple list format without any mathematical transformation, allowing the bar chart to display the actual sample intensity values as they exist in the data.

https://claude.ai/code/session_01Xojyb5SKM1zUkCMPLr63KE

Summary by CodeRabbit

  • Bug Fixes
    • Updated the Protein-Level bar chart to display raw sample intensities instead of log2-transformed values for more accurate visualization.
    • Refined bar chart tooltip documentation to reflect the intensity calculation changes.

Drop the log2 transform and y_min=0 from the BarChartColumn. With absolute
log2 values around 30, a real log2FC of 3 only translated to ~10% bar-height
difference, making bars look indistinguishable across samples. Plotting raw
intensities (with per-row auto-scaling) lets fold changes show up visually.
@t0mdavid-m t0mdavid-m merged commit 46bf208 into main Apr 29, 2026
5 of 6 checks passed
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 29, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 36202cb1-5517-4d30-a224-3cdc04837b03

📥 Commits

Reviewing files that changed from the base of the PR and between 4c6d9ee and 99a8b39.

📒 Files selected for processing (1)
  • content/results_abundance.py

📝 Walkthrough

Walkthrough

The abundance visualization page removes NumPy dependency and modifies the Intensity column calculation. Instead of using log2-transformed values, the chart now displays raw sample intensities stored directly as lists per row. The tooltip text is updated accordingly, and the explicit minimum y-axis configuration is removed.

Changes

Cohort / File(s) Summary
Abundance Visualization
content/results_abundance.py
Removed NumPy import; converted Intensity column from log2-transformed scale to raw sample intensities as lists; updated bar chart tooltip text; removed explicit y_min=0 configuration.

Poem

🐰 No more logs and transforms so dense,
Raw intensities make better sense,
NumPy's gone, the data flows clear,
Simpler charts we all hold dear! ✨

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/fix-protein-abundance-logging-TF9gY

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
Review rate limit: 0/1 reviews remaining, refill in 60 minutes.

Comment @coderabbitai help to get the list of available commands and usage tips.

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