fix(volcano plot): Upgrade PTM volcano plots to be interactive via plotly#200
fix(volcano plot): Upgrade PTM volcano plots to be interactive via plotly#200tonywu1999 merged 4 commits intodevelfrom
Conversation
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 40 minutes and 43 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe pull request updates PTM visualization rendering from standard R plots to Plotly-based interactive plots. Changes involve switching the render function from Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@R/statmodel-server-visualization.R`:
- Around line 86-97: The positional indexing using result[[3]] vs result[[1]] is
opaque—add a concise comment above the assignment to plot_result explaining that
groupComparisonPlotsPTM returns a list where element 3 is the adjusted peptide
plot (preferred) and element 1 is the unadjusted plot (fallback), so the code
chooses the adjusted plot when present; reference the symbols
groupComparisonPlotsPTM, result and plot_result in the comment to make the
contract explicit for future maintainers.
🪄 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
Run ID: 8cc3a9d2-8129-443f-a42d-f6ac3f5df9c7
📒 Files selected for processing (2)
R/module-statmodel-server.RR/statmodel-server-visualization.R
Motivation and Context
This PR fixes the PTM (Post-Translational Modification) visualization rendering to use interactive Plotly plots instead of static plots. Previously, PTM group comparison plots were rendered as static R plots, which limited user interaction and visualization capabilities. The fix enables Plotly-based rendering for PTM visualizations, providing a more interactive and user-friendly experience consistent with other plot types in the application.
Changes
R/module-statmodel-server.R
renderPlot()torenderPlotly()to produce interactive Plotly-based outputcreate_group_comparison_plot(input, loadpage_input(), data_comparison())remains unchangedR/statmodel-server-visualization.R
create_group_comparison_plot()function to handle PTM-specific plotting with Plotly supportisPlotly = TRUEparameter to thegroupComparisonPlotsPTM()function call to enable Plotly outputresult[[3]]when the result has at least 3 elements, otherwise falls back toresult[[1]]NULLreturn statement in the error handler for cleaner error managementUnit Tests
No new unit tests were added or modified to specifically verify the Plotly rendering changes. The existing test in
tests/testthat/test-utils-statmodel-server.Rvalidates that PTM visualization code generation includes thegroupComparisonPlotsPTMfunction call, but does not test the actual Plotly rendering behavior.Coding Guidelines
No coding guideline violations identified. The changes follow R and Shiny conventions:
renderPlotly)