Explorar o código

Compromise on column naming

Bryan Roessler hai 7 meses
pai
achega
88a0429bca
Modificáronse 1 ficheiros con 11 adicións e 8 borrados
  1. 11 8
      qhtcp-workflow/apps/r/calculate_interaction_zscores.R

+ 11 - 8
qhtcp-workflow/apps/r/calculate_interaction_zscores.R

@@ -293,10 +293,10 @@ calculate_interaction_scores <- function(df, max_conc, variables, group_vars = c
       lm_Score_K = sapply(lm_K, function(model) coef(model)[2] * max_conc + coef(model)[1]),
       lm_Score_r = sapply(lm_r, function(model) coef(model)[2] * max_conc + coef(model)[1]),
       lm_Score_AUC = sapply(lm_AUC, function(model) coef(model)[2] * max_conc + coef(model)[1]),
-      r_squared_L = sapply(lm_L, function(model) summary(model)$r.squared),
-      r_squared_K = sapply(lm_K, function(model) summary(model)$r.squared),
-      r_squared_r = sapply(lm_r, function(model) summary(model)$r.squared),
-      r_squared_AUC = sapply(lm_AUC, function(model) summary(model)$r.squared),
+      R_Squared_L = sapply(lm_L, function(model) summary(model)$r.squared),
+      R_Squared_K = sapply(lm_K, function(model) summary(model)$r.squared),
+      R_Squared_r = sapply(lm_r, function(model) summary(model)$r.squared),
+      R_Squared_AUC = sapply(lm_AUC, function(model) summary(model)$r.squared),
       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),
@@ -324,19 +324,22 @@ calculate_interaction_scores <- function(df, max_conc, variables, group_vars = c
       "se_L", "se_K", "se_r", "se_AUC",
       "Raw_Shift_L", "Raw_Shift_K", "Raw_Shift_r", "Raw_Shift_AUC",
       "Z_Shift_L", "Z_Shift_K", "Z_Shift_r", "Z_Shift_AUC",
-      "WT_L", "WT_K", "WT_r", "WT_AUC", "WT_sd_L", "WT_sd_K", "WT_sd_r", "WT_sd_AUC",
-      "Exp_L", "Exp_K", "Exp_r", "Exp_AUC", "Delta_L", "Delta_K", "Delta_r", "Delta_AUC",
+      "WT_L", "WT_K", "WT_r", "WT_AUC",
+      "WT_sd_L", "WT_sd_K", "WT_sd_r", "WT_sd_AUC",
+      "Exp_L", "Exp_K", "Exp_r", "Exp_AUC",
+      "Delta_L", "Delta_K", "Delta_r", "Delta_AUC",
       "Zscore_L", "Zscore_K", "Zscore_r", "Zscore_AUC",
       "NG", "SM", "DB") %>%
     ungroup()
 
   # Also arrange results by Z_lm_L and NG
   interactions <- stats %>%
-    select("OrfRep", "Gene", "num", "Raw_Shift_L", "Raw_Shift_K",  "Raw_Shift_AUC", "Raw_Shift_r",
+    select("OrfRep", "Gene", "num",
+      "Raw_Shift_L", "Raw_Shift_K", "Raw_Shift_AUC", "Raw_Shift_r",
       "Z_Shift_L", "Z_Shift_K", "Z_Shift_r", "Z_Shift_AUC",
       "lm_Score_L", "lm_Score_K", "lm_Score_AUC", "lm_Score_r",
       "R_Squared_L", "R_Squared_K", "R_Squared_r", "R_Squared_AUC",
-      "Sum_Z_Score_L", "Sum_Z_Score_K", "Sum_Z_Score_r", "Sum_Z_Score_AUC",
+      "Sum_Zscore_L", "Sum_Zscore_K", "Sum_Zscore_r", "Sum_Zscore_AUC",
       "Avg_Zscore_L", "Avg_Zscore_K", "Avg_Zscore_r", "Avg_Zscore_AUC",
       "Z_lm_L", "Z_lm_K", "Z_lm_r", "Z_lm_AUC",
       "NG", "SM", "DB") %>%