fix(profile-plot): Only add error bars to profile plots if bounds exist#197
fix(profile-plot): Only add error bars to profile plots if bounds exist#197tonywu1999 merged 1 commit intodevelfrom
Conversation
📝 WalkthroughWalkthroughThe Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨No code suggestions found for the PR. |
PR Type
Bug fix
Description
Skip error bars without bounds
Filter
Run summaryrows by boundsPrevent invalid profile plot rendering
Diagram Walkthrough
File Walkthrough
utils_dataprocess_plots.R
Guard profile error bars against missing boundsR/utils_dataprocess_plots.R
geom_errorbar()data toRun summaryrowsNAinUPPERBOUNDorLOWERBOUNDMotivation and Context
Error bars in run-summary profile plots were being rendered regardless of whether confidence bound values were actually available. This could cause rendering issues or misleading visualizations when the
UPPERBOUNDandLOWERBOUNDcolumns contained missing values (NA). The fix ensures that error bars are only added to the plot when both upper and lower bounds are present, preventing display artifacts and maintaining visual integrity.Changes
geom_errorbar()call in the.makeSummaryProfilePlot()function inR/utils_dataprocess_plots.Rinput[input$PEPTIDE == "Run summary"]input[input$PEPTIDE == "Run summary" & !is.na(input$UPPERBOUND) & !is.na(input$LOWERBOUND)]!is.na(input$UPPERBOUND)and!is.na(input$LOWERBOUND)) ensures error bars are only rendered when both bound values are definedCoding Guidelines
No violations of coding guidelines were identified. The change follows the existing code style and conventions used throughout the codebase for conditional data filtering in ggplot2 layer definitions.