tidied script plotting_data.R by removing superceded code

This commit is contained in:
Tanushree Tunstall 2021-09-10 18:19:56 +01:00
parent 3ddbee8c90
commit 27f0b15d4c

View file

@ -31,62 +31,6 @@ dup_muts = data.frame()
cat("\nInput dimensions:", dim(df)) 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 # extract unique mutation entries
#================================== #==================================