Move global vars to top of main()

This commit is contained in:
2024-09-11 15:20:47 -04:00
parent cee290fd69
commit f4581d7fcb

View File

@@ -587,6 +587,9 @@ main <- function() {
dir.create(out_dir, recursive = TRUE, showWarnings = FALSE)
dir.create(out_dir_qc, recursive = TRUE, showWarnings = FALSE)
variables <- c("L", "K", "r", "AUC") # fields to filter and calculate across
group_vars <- c("OrfRep", "conc_num", "conc_num_factor") # default fields to group by
message("Loading and filtering data")
df <- load_and_process_data(args$easy_results_file, sd = exp_sd)
df <- update_gene_names(df, args$sgd_gene_list)
@@ -612,9 +615,6 @@ main <- function() {
filter(., if_all(c(L), is.finite))
}
variables <- c("L", "K", "r", "AUC") # fields to filter and calculate across
group_vars <- c("OrfRep", "conc_num", "conc_num_factor") # fields to group by
# Set some constants
max_conc <- max(df$conc_num_factor)
l_half_median <- (median(df_above_tolerance$L, na.rm = TRUE)) / 2