From 96129ddc340712407e7c3bea172fa43f7174fae3 Mon Sep 17 00:00:00 2001 From: Tanushree Tunstall Date: Fri, 10 Sep 2021 18:19:56 +0100 Subject: [PATCH] tidied script plotting_data.R by removing superceded code --- scripts/functions/plotting_data.R | 56 ------------------------------- 1 file changed, 56 deletions(-) diff --git a/scripts/functions/plotting_data.R b/scripts/functions/plotting_data.R index fa4e9c1..faaebca 100755 --- a/scripts/functions/plotting_data.R +++ b/scripts/functions/plotting_data.R @@ -31,62 +31,6 @@ dup_muts = data.frame() cat("\nInput dimensions:", dim(df)) -#================================== -# add foldx outcome category -# and foldx scaled values - -# This will enable to always have these variables available -# when calling for plots -# included this now in combine_dfs.py!!!! finallyS -#================================== - -#------------------------------ -# # adding foldx scaled values -# # scale data b/w -1 and 1 -# #------------------------------ -# n = which(colnames(df) == "ddg"); n -# -# my_min = min(df[,n]); my_min -# my_max = max(df[,n]); my_max -# -# df$foldx_scaled = ifelse(df[,n] < 0 -# , df[,n]/abs(my_min) -# , df[,n]/my_max) -# # sanity check -# my_min = min(df$foldx_scaled); my_min -# my_max = max(df$foldx_scaled); my_max -# -# if (my_min == -1 && my_max == 1){ -# cat("\nPASS: foldx ddg successfully scaled b/w -1 and 1" -# , "\nProceeding with assigning foldx outcome category") -# }else{ -# cat("\nFAIL: could not scale foldx ddg values" -# , "Aborting!\n") -# } - -#------------------------------ -# adding foldx outcome category -# ddg<0 = "Stabilising" (-ve) -#------------------------------ -# c1 = table(df$ddg < 0) -# df$foldx_outcome = ifelse(df$ddg < 0, "Stabilising", "Destabilising") -# c2 = table(df$ddg < 0) -# -# if ( all(c1 == c2) ){ -# cat("\nPASS: foldx outcome successfully created") -# }else{ -# cat("\nFAIL: foldx outcome could not be created. Aborting!\n") -# exit() -# } - -#------------------------------ -# renaming foldx column from -# "ddg" --> "ddg_foldx" -#------------------------------ - -# # change name to foldx -# colnames(df)[n] <- "ddg_foldx" - #================================== # extract unique mutation entries #==================================