From 549090b572681b53373500ee0081860005386b72 Mon Sep 17 00:00:00 2001 From: Bryan Roessler Date: Sun, 15 Sep 2024 17:37:19 -0400 Subject: [PATCH] Correctly pass annotations as list of list --- qhtcp-workflow/apps/r/calculate_interaction_zscores.R | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/qhtcp-workflow/apps/r/calculate_interaction_zscores.R b/qhtcp-workflow/apps/r/calculate_interaction_zscores.R index a9890c84..61111e01 100644 --- a/qhtcp-workflow/apps/r/calculate_interaction_zscores.R +++ b/qhtcp-workflow/apps/r/calculate_interaction_zscores.R @@ -874,10 +874,12 @@ main <- function() { message("Calculating summary statistics for L within 2SD of K") # TODO We're omitting the original z_max calculation, not sure if needed? ss <- calculate_summary_stats(df_na_within_2sd_k, "L", group_vars = c("conc_num", "conc_num_factor")) + # df_na_l_within_2sd_k_stats <- ss$df_with_stats write.csv(ss$summary_stats, file = file.path(out_dir_qc, "max_observed_L_vals_for_spots_within_2sd_K.csv"), row.names = FALSE) message("Calculating summary statistics for L outside 2SD of K") ss <- calculate_summary_stats(df_na_outside_2sd_k, "L", group_vars = c("conc_num", "conc_num_factor")) + df_na_l_outside_2sd_k_stats <- ss$df_with_stats write.csv(ss$summary_stats, file = file.path(out_dir, "max_observed_L_vals_for_spots_outside_2sd_K.csv"), row.names = FALSE) # Each plots list corresponds to a file @@ -933,9 +935,11 @@ main <- function() { color_var = "conc_num_factor", position = "jitter", annotations = list( - x = l_half_median, - y = k_half_median, - label = paste("# strains above Delta Background tolerance =", nrow(df_above_tolerance)) + list( + x = l_half_median, + y = k_half_median, + label = paste("# strains above Delta Background tolerance =", nrow(df_above_tolerance)) + ) ), error_bar = FALSE, legend_position = "right"