Explorar o código

Correctly pass annotations as list of list

Bryan Roessler hai 7 meses
pai
achega
549090b572
Modificáronse 1 ficheiros con 7 adicións e 3 borrados
  1. 7 3
      qhtcp-workflow/apps/r/calculate_interaction_zscores.R

+ 7 - 3
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"