Fix output dir usage
This commit is contained in:
@@ -306,7 +306,7 @@ calculate_bg_means <- function(df_stats_by_l, df_stats_by_k, df_stats_by_r, df_s
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Process strains (deletion and reference)
|
# Process strains (deletion and reference)
|
||||||
process_strains <- function(df, l_within_2sd_k, strain, output_dir) {
|
process_strains <- function(df, l_within_2sd_k, strain) {
|
||||||
df_strains <- data.frame() # Initialize an empty dataframe to store results
|
df_strains <- data.frame() # Initialize an empty dataframe to store results
|
||||||
|
|
||||||
for (concentration in unique(df$conc_num)) {
|
for (concentration in unique(df$conc_num)) {
|
||||||
@@ -627,7 +627,7 @@ main <- function() {
|
|||||||
stats_by_r_bg <- stats_bg %>% select(starts_with("r_"), "OrfRep", "conc_num", "conc_num_factor")
|
stats_by_r_bg <- stats_bg %>% select(starts_with("r_"), "OrfRep", "conc_num", "conc_num_factor")
|
||||||
stats_by_auc_bg <- stats_bg %>% select(starts_with("AUC_"), "OrfRep", "conc_num", "conc_num_factor")
|
stats_by_auc_bg <- stats_bg %>% select(starts_with("AUC_"), "OrfRep", "conc_num", "conc_num_factor")
|
||||||
write.csv(stats_bg,
|
write.csv(stats_bg,
|
||||||
file = file.path(output_dir, paste0("SummaryStats_BackgroundStrains_", strain, ".csv")),
|
file = file.path(out_dir, paste0("SummaryStats_BackgroundStrains_", strain, ".csv")),
|
||||||
row.names = FALSE)
|
row.names = FALSE)
|
||||||
stats_bg_joined <- left_join(df_bg, stats_bg, by = c("conc_num", "conc_num_factor"))
|
stats_bg_joined <- left_join(df_bg, stats_bg, by = c("conc_num", "conc_num_factor"))
|
||||||
|
|
||||||
@@ -666,9 +666,9 @@ main <- function() {
|
|||||||
mutate(SM = 0)
|
mutate(SM = 0)
|
||||||
|
|
||||||
message("Processing reference strain")
|
message("Processing reference strain")
|
||||||
reference_strain <- process_strains(df_reference, l_within_2sd_k, strain, out_dir)
|
reference_strain <- process_strains(df_reference, l_within_2sd_k, strain)
|
||||||
message("Processing deletion strains")
|
message("Processing deletion strains")
|
||||||
deletion_strains <- process_strains(df_deletion, l_within_2sd_k, strain, out_dir)
|
deletion_strains <- process_strains(df_deletion, l_within_2sd_k, strain)
|
||||||
|
|
||||||
# Deprecated
|
# Deprecated
|
||||||
# Change OrfRep to include the reference strain, gene, and Num so each RF gets its own score
|
# Change OrfRep to include the reference strain, gene, and Num so each RF gets its own score
|
||||||
|
|||||||
Reference in New Issue
Block a user