From a287b801f7c27e7849b011d1b92e4995895d1c8e Mon Sep 17 00:00:00 2001 From: Tanushree Tunstall Date: Mon, 31 Jan 2022 17:36:00 +0000 Subject: [PATCH] saving before commiting --- scripts/functions/corr_plot_df.R | 9 +++++---- scripts/plotting/get_plotting_dfs.R | 15 +++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/scripts/functions/corr_plot_df.R b/scripts/functions/corr_plot_df.R index 4cb878b..0493156 100644 --- a/scripts/functions/corr_plot_df.R +++ b/scripts/functions/corr_plot_df.R @@ -7,6 +7,7 @@ # merged_df3 or merged_df2!? # gene: [sanity check] # drug: relates to a column name that will need to extracted + # ligand_dist_colname = LigDist_colname (variable from plotting_globals() #colnames_to_extract = c("mutationinformation" # , "duet_affinity_change") @@ -18,11 +19,11 @@ # TO DO: SHINY #1) Corr type? #2) - ################################################################## corr_data_extract <- function(corr_plot_df #, gene_name = gene , drug_name = drug + , ligand_dist_colname = LigDist_colname , colnames_to_extract , colnames_display_key , extract_scaled_cols = F){ @@ -44,7 +45,7 @@ corr_data_extract <- function(corr_plot_df , "duet_stability_change" , "ligand_affinity_change" #, "ligand_distance" - , LigDist_colname + , ligand_dist_colname , "ddg_foldx" , "deepddg" , "asa" @@ -78,7 +79,7 @@ corr_data_extract <- function(corr_plot_df colnames_display_key = c(duet_stability_change = "DUET" , ligand_affinity_change = "mCSM-lig" #, ligand_distance = "ligand_distance" - #, LigDist_colname = "ligand_distance" + #, ligand_dist_colname = "ligand_distance" , ddg_foldx = "FoldX" , deepddg = "DeepDDG" , asa = "ASA" @@ -115,7 +116,7 @@ corr_data_extract <- function(corr_plot_df ,"\nRenaming successful") cat("\nSneak peak...") - #print(head(corr_df)) + print(head(corr_df)) # Move drug column to the end last_col = colnames(corr_df[ncol(corr_df)]) diff --git a/scripts/plotting/get_plotting_dfs.R b/scripts/plotting/get_plotting_dfs.R index 6d4d83f..9d7f395 100644 --- a/scripts/plotting/get_plotting_dfs.R +++ b/scripts/plotting/get_plotting_dfs.R @@ -127,19 +127,19 @@ cat(s1) #source("other_plots_data.R") # FIXME -source(paste0(plot_script_path, "dm_om_data.R")) +#source(paste0(plot_script_path, "dm_om_data.R")) -s2 = c("\nSuccessfully sourced other_plots_data.R") -cat(s2) +#s2 = c("\nSuccessfully sourced other_plots_data.R") +#cat(s2) #################################################################### # Data for Lineage barplots: WF and LF dfs #################################################################### -source(paste0(plot_script_path, "lineage_data.R")) +#source(paste0(plot_script_path, "lineage_data.R")) -s3 = c("\nSuccessfully sourced lineage_data.R") -cat(s3) +#s3 = c("\nSuccessfully sourced lineage_data.R") +#cat(s3) #################################################################### # Data for corr plots: @@ -184,8 +184,7 @@ vars1 = ls(envir = .GlobalEnv)[grepl("^cols_to*", ls(envir = .GlobalEnv))] vars2 = ls(envir = .GlobalEnv)[grepl("pivot_cols_*", ls(envir = .GlobalEnv))] vars3 = ls(envir = .GlobalEnv)[grepl("expected_*", ls(envir = .GlobalEnv))] -rm(c1 - , fact_cols +rm( fact_cols , infile_metadata , infile_params , vars0