-
Notifications
You must be signed in to change notification settings - Fork 10
Description
Story
Following the dose response curve download implementation #163, the same download pattern needs to be extended to the remaining plot types: Volcano Plot, Heatmap, and Comparison Plot.
Currently, when a user generates these plots via "View plot in browser", the app creates visualization files with an Ex_ prefix in the working directory. The download handler then pattern-matches the most recently written Ex_ file. This approach is fragile as it depends on working directory state and file timestamps, and can serve stale files if a previous plot wasn't cleaned up.
The dose response curve download was refactored to generate the plot on-demand within the download handler, save to a temp directory, zip it, and serve it directly. This same pattern should be applied to Volcano Plot, Heatmap, and Comparison Plot.
Subtasks
- Refactor create_download_plot_handler to generate Volcano Plot, Heatmap, and Comparison Plot on-demand within the download handler
- Replace the existing Ex_ file pattern-matching fallback with direct plot generation for each plot type
Ensure all user-selected options (comparison selection, fold change cutoff, significance cutoff, log base, clustering, protein selection, etc.) are passed through correctly - Add unit tests, with particular focus on Volcano Plot download
- Remove the legacy Ex_ pattern-matching code once all plot types are covered
References
Previous PR: Link
create_download_plot_handler in R/statmodel-server-visualization.R
create_group_comparison_plot in R/statmodel-server-visualization.R