diff --git a/qhtcp-workflow/apps/r/calculate_interaction_zscores.R b/qhtcp-workflow/apps/r/calculate_interaction_zscores.R index a68fe8c6..86be1ec5 100644 --- a/qhtcp-workflow/apps/r/calculate_interaction_zscores.R +++ b/qhtcp-workflow/apps/r/calculate_interaction_zscores.R @@ -656,10 +656,10 @@ generate_and_save_plots <- function(out_dir, filename, plot_configs, page_width ) } - #plotly_plot <- suppressWarnings(plotly::ggplotly(plot)) + plotly_plot <- suppressWarnings(plotly::ggplotly(plot)) static_plots[[i]] <- plot - #plotly_plots[[i]] <- plotly_plot + plotly_plots[[i]] <- plotly_plot } grid_layout <- group$grid_layout @@ -696,12 +696,12 @@ generate_and_save_plots <- function(out_dir, filename, plot_configs, page_width dev.off() - # out_html_file <- file.path(out_dir, paste0(filename, ".html")) - # message("Saving combined HTML file: ", out_html_file) - # htmltools::save_html( - # htmltools::tagList(plotly_plots), - # file = out_html_file - # ) + out_html_file <- file.path(out_dir, paste0(filename, ".html")) + message("Saving combined HTML file: ", out_html_file) + htmltools::save_html( + htmltools::tagList(plotly_plots), + file = out_html_file + ) } generate_scatter_plot <- function(plot, config) { @@ -1535,23 +1535,23 @@ main <- function() { plot_configs <- list( list(out_dir = out_dir_qc, filename = "L_vs_K_before_quality_control", - plot_configs = l_vs_k_plot_configs, page_width = 12, page_height = 8) - # list(out_dir = out_dir_qc, filename = "frequency_delta_background", - # plot_configs = frequency_delta_bg_plot_configs, page_width = 12, page_height = 8), - # list(out_dir = out_dir_qc, filename = "L_vs_K_above_threshold", - # plot_configs = above_threshold_plot_configs, page_width = 12, page_height = 8), - # list(out_dir = out_dir_qc, filename = "plate_analysis", - # plot_configs = plate_analysis_plot_configs, page_width = 14, page_height = 9), - # list(out_dir = out_dir_qc, filename = "plate_analysis_boxplots", - # plot_configs = plate_analysis_boxplot_configs, page_width = 18, page_height = 9), - # list(out_dir = out_dir_qc, filename = "plate_analysis_no_zeros", - # plot_configs = plate_analysis_no_zeros_plot_configs, page_width = 14, page_height = 9), - # list(out_dir = out_dir_qc, filename = "plate_analysis_no_zeros_boxplots", - # plot_configs = plate_analysis_no_zeros_boxplot_configs, page_width = 18, page_height = 9), - # list(out_dir = out_dir_qc, filename = "L_vs_K_for_strains_2SD_outside_mean_K", - # plot_configs = l_outside_2sd_k_plot_configs, page_width = 10, page_height = 8), - # list(out_dir = out_dir_qc, filename = "delta_background_vs_K_for_strains_2SD_outside_mean_K", - # plot_configs = delta_bg_outside_2sd_k_plot_configs, page_width = 10, page_height = 8) + plot_configs = l_vs_k_plot_configs, page_width = 12, page_height = 8), + list(out_dir = out_dir_qc, filename = "frequency_delta_background", + plot_configs = frequency_delta_bg_plot_configs, page_width = 12, page_height = 8), + list(out_dir = out_dir_qc, filename = "L_vs_K_above_threshold", + plot_configs = above_threshold_plot_configs, page_width = 12, page_height = 8), + list(out_dir = out_dir_qc, filename = "plate_analysis", + plot_configs = plate_analysis_plot_configs, page_width = 14, page_height = 9), + list(out_dir = out_dir_qc, filename = "plate_analysis_boxplots", + plot_configs = plate_analysis_boxplot_configs, page_width = 18, page_height = 9), + list(out_dir = out_dir_qc, filename = "plate_analysis_no_zeros", + plot_configs = plate_analysis_no_zeros_plot_configs, page_width = 14, page_height = 9), + list(out_dir = out_dir_qc, filename = "plate_analysis_no_zeros_boxplots", + plot_configs = plate_analysis_no_zeros_boxplot_configs, page_width = 18, page_height = 9), + list(out_dir = out_dir_qc, filename = "L_vs_K_for_strains_2SD_outside_mean_K", + plot_configs = l_outside_2sd_k_plot_configs, page_width = 10, page_height = 8), + list(out_dir = out_dir_qc, filename = "delta_background_vs_K_for_strains_2SD_outside_mean_K", + plot_configs = delta_bg_outside_2sd_k_plot_configs, page_width = 10, page_height = 8) ) # Parallelize background and quality control plot generation