Skip to content

Analyte-neutral wording for the QC and statmodel pages - #225

Merged
tonywu1999 merged 2 commits into
develfrom
MSstatsShiny/work/20260731_metabolomics_terminology_qc_statmodel
Aug 1, 2026
Merged

Analyte-neutral wording for the QC and statmodel pages#225
tonywu1999 merged 2 commits into
develfrom
MSstatsShiny/work/20260731_metabolomics_terminology_qc_statmodel

Conversation

@swaraj-neu

@swaraj-neu swaraj-neu commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Motivation and Context

The QC and statmodel pages used protein-specific wording. This wording does not fit all analyte types, including metabolomics data. The changes replace protein-specific user-facing text with analyte-neutral terminology without changing processing behavior.

Changes

  • Updated QC instructions and descriptions to use analyte or feature terminology.
  • Clarified local normalization, model-based imputation, and summary downloads.
  • Renamed QC summarization actions and instructional text.
  • Changed QC selector labels from ALL PROTEINS to ALL ANALYTES.
  • Renamed statmodel results headings and download labels to use analytes.
  • Changed the visualization selector text to refer to analytes.
  • Updated heatmap notes, labels, tooltips, and dendrogram options.
  • Preserved internal option values and data-processing behavior.

Tests

  • Updated tests/testthat/test-statmodel-ui-options-visualization.R.
  • Tests now expect analyte-based dendrogram labels, including combined dendrogram text.

Coding Guidelines

No coding guideline violations are evident in the reviewed changes.

@swaraj-neu
swaraj-neu requested a review from tonywu1999 July 31, 2026 21:32
@swaraj-neu swaraj-neu self-assigned this Jul 31, 2026
@swaraj-neu swaraj-neu added the enhancement New feature or request label Jul 31, 2026
@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@swaraj-neu, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 46 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 198e2f76-b3a0-4be3-b0cf-08f108bd621f

📥 Commits

Reviewing files that changed from the base of the PR and between 3032ceb and ffc9af7.

📒 Files selected for processing (2)
  • R/module-qc-ui.R
  • R/statmodel-ui-options-visualization.R
📝 Walkthrough

Walkthrough

The PR replaces protein-specific UI terminology with analyte- and feature-level terminology across QC, modeling, visualization, and heatmap interfaces. Related heatmap tests now expect the updated labels. Internal option values and processing behavior remain unchanged.

Changes

Analyte terminology updates

Layer / File(s) Summary
QC terminology and selectors
R/module-qc-ui.R, R/qc-server-plots.R
QC descriptions, actions, summary labels, and aggregate selectors now use analyte or summarized-data terminology.
Modeling and visualization labels
R/statmodel-server-results-table.R, R/statmodel-server-visualization.R
Results headings, download labels, and the visualization selector now use analyte terminology.
Heatmap terminology and tests
R/statmodel-ui-options-visualization.R, tests/testthat/test-statmodel-ui-options-visualization.R
Heatmap text and dendrogram tests now use analyte terminology. Internal option values remain unchanged.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: tonywu1999

Poem

A rabbit checks each analyte name,
No protein label stays the same.
QC and heatmaps speak anew,
The tests confirm the wording too.
Hop, hop—clear terms now guide the view!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the terminology updates across the QC and statmodel pages.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch MSstatsShiny/work/20260731_metabolomics_terminology_qc_statmodel

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (1)
tests/testthat/test-statmodel-ui-options-visualization.R (1)

23-25: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick win

Assert the preserved clustering values in this test.

The implementation must continue emitting protein, comparison, and both as option values. The updated test checks only display labels, so it does not protect the contract used by R/plotting_funtions.R.

Proposed test additions
  expect_true(grepl("analyte dendrogram", ui_html))
  expect_true(grepl("comparison dendrogram", ui_html))
  expect_true(grepl("analyte and comparison dendrograms", ui_html))
+ expect_true(grepl('value="protein"', ui_html))
+ expect_true(grepl('value="comparison"', ui_html))
+ expect_true(grepl('value="both"', ui_html))
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/testthat/test-statmodel-ui-options-visualization.R` around lines 23 -
25, Update the UI options test around the existing dendrogram assertions to also
verify that the generated HTML preserves the option values “protein”,
“comparison”, and “both”. Keep the current display-label checks and assert each
value is emitted, protecting the contract consumed by the plotting code.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@R/module-qc-ui.R`:
- Around line 240-241: Update the tooltip text in the abundance summary UI near
h4("Download summary of abundance") to correct the grammar by changing “each
biological samples” to “each biological sample” while preserving the rest of the
message.

In `@R/statmodel-ui-options-visualization.R`:
- Line 96: Update the tooltip text in the visualization options UI to exactly
describe ordering by using analyte means, comparison means, or both, with the
requested capitalization and a terminating period. Keep the existing div
structure and class unchanged.
- Line 77: Update the remaining protein-specific user-facing text in the
statmodel visualization page, including the strings near the heatmap note and
the references to “protein abundances” and “one comparison/protein.” Replace
them with consistent analyte-focused terminology, preserving wording that is
intentionally protein-specific.

---

Nitpick comments:
In `@tests/testthat/test-statmodel-ui-options-visualization.R`:
- Around line 23-25: Update the UI options test around the existing dendrogram
assertions to also verify that the generated HTML preserves the option values
“protein”, “comparison”, and “both”. Keep the current display-label checks and
assert each value is emitted, protecting the contract consumed by the plotting
code.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 8217c88e-6cc1-465c-8e5f-deb828a4e022

📥 Commits

Reviewing files that changed from the base of the PR and between 5896704 and 3032ceb.

📒 Files selected for processing (6)
  • R/module-qc-ui.R
  • R/qc-server-plots.R
  • R/statmodel-server-results-table.R
  • R/statmodel-server-visualization.R
  • R/statmodel-ui-options-visualization.R
  • tests/testthat/test-statmodel-ui-options-visualization.R

Comment thread R/module-qc-ui.R Outdated
create_heatmap_options <- function(ns) {
tagList(
h4("Note: Only one page will be shown in browser. To view all proteins please view this plot as a pdf. Heatmaps require at least two comparisons."),
h4("Note: Only one page will be shown in browser. To view all analytes please view this plot as a pdf. Heatmaps require at least two comparisons."),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Remove the remaining protein-specific copy from the statmodel visualization page.

This change makes the heatmap controls analyte-focused, but the same page still shows protein abundances at Line 121 and one comparison/protein at Line 147. Users will see mixed terminology. Update those strings unless they are intentionally protein-specific.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@R/statmodel-ui-options-visualization.R` at line 77, Update the remaining
protein-specific user-facing text in the statmodel visualization page, including
the strings near the heatmap note and the references to “protein abundances” and
“one comparison/protein.” Replace them with consistent analyte-focused
terminology, preserving wording that is intentionally protein-specific.

Comment thread R/statmodel-ui-options-visualization.R Outdated
class = "icon-wrapper",
icon("question-circle", lib = "font-awesome"),
div("Determines how to order proteins and comparisons. protein means, comparison means, or both", class = "icon-tooltip")
div("Determines how to order analytes and comparisons. analyte means, comparison means, or both", class = "icon-tooltip")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Make the cluster-analysis tooltip a complete sentence.

Use Determines how to order analytes and comparisons using analyte means, comparison means, or both. This also capitalizes Analyte correctly.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@R/statmodel-ui-options-visualization.R` at line 96, Update the tooltip text
in the visualization options UI to exactly describe ordering by using analyte
means, comparison means, or both, with the requested capitalization and a
terminating period. Keep the existing div structure and class unchanged.

@tonywu1999
tonywu1999 merged commit e4aa2e0 into devel Aug 1, 2026
2 checks passed
@tonywu1999
tonywu1999 deleted the MSstatsShiny/work/20260731_metabolomics_terminology_qc_statmodel branch August 1, 2026 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants