Skip to content

feat(dataProcessPlots): Add confidence interval bars to profile plots#179

Merged
tonywu1999 merged 4 commits intodevelfrom
feature-conf-interval
Jan 7, 2026
Merged

feat(dataProcessPlots): Add confidence interval bars to profile plots#179
tonywu1999 merged 4 commits intodevelfrom
feature-conf-interval

Conversation

@tonywu1999
Copy link
Contributor

@tonywu1999 tonywu1999 commented Jan 7, 2026

Motivation and Context

We should add confidence intervals for MSstats+

Changes

  • If the variance column exists in the quantitative output of dataProcess, then add confidence interval bars to profile plot

Testing

  • Verified confidence intervals were added when variance column exists, and none otherwise.
  • Tested with MSstats+ vignette.

Checklist Before Requesting a Review

  • I have read the MSstats contributing guidelines
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules
  • I have run the devtools::document() command after my changes and committed the added files

Summary by CodeRabbit

  • New Features

    • Profile plots now show 95% confidence-like intervals as error bars on peptide run summary plots when variance is available, highlighting uncertainty around intensity measurements.
  • Documentation

    • Vignette updated with a paragraph and example demonstrating the new profile-plot visualization and how to call it for summarized data.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 7, 2026

📝 Walkthrough

Walkthrough

Adds LOWERBOUND and UPPERBOUND to Run summary data when Variance exists, and renders them as error bars in the Run summary branch of the profile plot for censored analyses; vignette updated with an example for the ProfilePlot.

Changes

Cohort / File(s) Summary
Summary Data Preparation
R/dataProcessPlots.R
Adds UPPERBOUND and LOWERBOUND fields computing ~95% confidence-like intervals around LogIntensities when Variance is present; otherwise NA_real_.
Visualization Layer
R/utils_dataprocess_plots.R
In .makeSummaryProfilePlot, when is_censored is TRUE adds a geom_errorbar for the "Run summary" peptide subset mapping ymin=LOWERBOUND, ymax=UPPERBOUND, and color=analysis.
Documentation / Example
vignettes/MSstatsPlus.Rmd
Adds descriptive text and a code example showing ProfilePlot visualization of variance via the new confidence-interval-like bounds.

Sequence Diagram(s)

(omitted — changes are localized to data preparation and plotting code; no multi-component sequential flow requiring visualization)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

Review effort 2/5

Suggested reviewers

  • devonjkohler
  • mstaniak
  • anshuman-raina

Poem

🐰 I nibbled through data, hop by hop,
Boundaries drawn where variances stop.
Little bars show where numbers hide,
Run summaries beam with interval pride. 🎨📈

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding confidence interval bars to profile plots in dataProcessPlots function.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed The PR description follows the required template with all key sections present: motivation, detailed changes list, testing description, and completed checklist.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

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 and usage tips.

@github-actions
Copy link

github-actions bot commented Jan 7, 2026

Failed to generate code suggestions for PR

@tonywu1999 tonywu1999 marked this pull request as ready for review January 7, 2026 17:12
@tonywu1999 tonywu1999 merged commit 86b5710 into devel Jan 7, 2026
2 checks passed
@tonywu1999 tonywu1999 deleted the feature-conf-interval branch January 7, 2026 19:19
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.

1 participant