repurposing corr_data.R into a function to allow required params to be passed in

This commit is contained in:
Tanushree Tunstall 2022-01-29 17:24:15 +00:00
parent 7317156bba
commit 5346431256
4 changed files with 126 additions and 50 deletions

View file

@ -124,31 +124,41 @@ cat(s1)
####################################################################
# Data for DM OM Plots: Long format dfs
####################################################################
#source("other_plots_data.R")
# source(paste0(plot_script_path, "dm_om_data.R"))
#
# s2 = c("\nSuccessfully sourced other_plots_data.R")
# cat(s2)
#source(paste0(plot_script_path, "dm_om_data.R"))
#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"))
#
# s3 = c("\nSuccessfully sourced lineage_data.R")
# cat(s3)
source(paste0(plot_script_path, "lineage_data.R"))
s3 = c("\nSuccessfully sourced lineage_data.R")
cat(s3)
####################################################################
# Data for corr plots:
####################################################################
# make sure the above script works because merged_df2_combined is needed
# source(paste0(plot_script_path, "corr_data.R"))
#
# s4 = c("\nSuccessfully sourced corr_data.R")
# cat(s4)
#source(paste0(plot_script_path, "corr_data.R"))
#s4 = c("\nSuccessfully sourced corr_data.R")
#cat(s4)
# Moved "logo_data.R" to redundant/
#-----------------------------------------
# Replaced above with my function
# corr_data_extract()
corr_df_m3_f = corr_data_extract(merged_df3, extract_scaled_cols = F)
head(corr_df_m3_f)
corr_df_m2_f = corr_data_extract(merged_df2, extract_scaled_cols = F)
head(corr_df_m2_f)
########################################################################
# End of script
@ -158,13 +168,13 @@ cat(s1)
# "\n##################################################"
# , "\nSuccessful: get_plotting_dfs.R worked!"
# , "\n###################################################\n")
# } else {
# } else {
# cat(
# "\n#################################################"
# , "\nFAIL: get_plotting_dfs.R didn't complete fully!Please check"
# , "\n###################################################\n" )
# }
#
# }
########################################################################
# clear excess variables: from the global enviornment