From fea56ac7a9684c837075f8226a9fad9a1764d83a Mon Sep 17 00:00:00 2001 From: Bryan Roessler Date: Tue, 24 Sep 2024 20:10:09 -0400 Subject: [PATCH] Revert to original column naming for Sum_Z_score --- .../apps/r/calculate_interaction_zscores.R | 16 ++++++++-------- qhtcp-workflow/qhtcp-workflow | 1 + 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/qhtcp-workflow/apps/r/calculate_interaction_zscores.R b/qhtcp-workflow/apps/r/calculate_interaction_zscores.R index 0e37d1d6..e2fb70e5 100644 --- a/qhtcp-workflow/apps/r/calculate_interaction_zscores.R +++ b/qhtcp-workflow/apps/r/calculate_interaction_zscores.R @@ -322,16 +322,16 @@ calculate_interaction_scores <- function(df, max_conc, variables = c("L", "K", " Z_Shift_AUC = first(Z_Shift_AUC), # Sum Z-scores - Sum_Zscore_L = sum(Zscore_L, na.rm = TRUE), - Sum_Zscore_K = sum(Zscore_K, na.rm = TRUE), - Sum_Zscore_r = sum(Zscore_r, na.rm = TRUE), - Sum_Zscore_AUC = sum(Zscore_AUC, na.rm = TRUE), + Sum_Z_score_L = sum(Zscore_L), + Sum_Z_score_K = sum(Zscore_K), + Sum_Z_score_r = sum(Zscore_r), + Sum_Z_score_AUC = sum(Zscore_AUC), # Calculate Average Z-scores - Avg_Zscore_L = Sum_Zscore_L / num_non_removed_concs, - Avg_Zscore_K = Sum_Zscore_K / num_non_removed_concs, - Avg_Zscore_r = Sum_Zscore_r / (total_conc_num - 1), - Avg_Zscore_AUC = Sum_Zscore_AUC / (total_conc_num - 1) + Avg_Zscore_L = Sum_Z_score_L / num_non_removed_concs, + Avg_Zscore_K = Sum_Z_score_K / num_non_removed_concs, + Avg_Zscore_r = Sum_Z_score_r / (total_conc_num - 1), + Avg_Zscore_AUC = Sum_Z_score_AUC / (total_conc_num - 1) ) %>% arrange(desc(Z_lm_L), desc(NG)) %>% ungroup() diff --git a/qhtcp-workflow/qhtcp-workflow b/qhtcp-workflow/qhtcp-workflow index c6225ee9..df62e12f 100755 --- a/qhtcp-workflow/qhtcp-workflow +++ b/qhtcp-workflow/qhtcp-workflow @@ -1431,6 +1431,7 @@ wrapper calculate_interaction_zscores # # * More variables can be read in from the config file to allow more configuration # * Add gene names, other threshold values, etc. +# * Dataframe columns and output file columns should be standardized in calculate_interactions() # # INPUT #