Correctly pass annotations as list of list

This commit is contained in:
2024-09-15 17:37:19 -04:00
parent 971fb80194
commit 549090b572

View File

@@ -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(
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"