From 7e6affea843c0f9c16a279cd4661631a78d35190 Mon Sep 17 00:00:00 2001 From: Tanushree Tunstall Date: Wed, 23 Jun 2021 16:16:23 +0100 Subject: [PATCH] added test_plotting_data.R, and replaced input param of csv into df --- scripts/functions/test_plotting_data.R | 29 ++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 scripts/functions/test_plotting_data.R diff --git a/scripts/functions/test_plotting_data.R b/scripts/functions/test_plotting_data.R new file mode 100644 index 0000000..80e88da --- /dev/null +++ b/scripts/functions/test_plotting_data.R @@ -0,0 +1,29 @@ +getwd() +setwd("~/git/LSHTM_analysis/scripts/functions/") +getwd() +############################################################# +#=========================================== +# load functions, data, dirs, hardocded vars +# that will be used in testing the functions +#=========================================== +source("plotting_globals.R") + +drug = "streptomycin" +gene = "gid" + +import_dirs(drug_name = drug, gene_name = gene) + +#------------------------------- +# test function: plotting_data() +#------------------------------- +source("plotting_data.R") + +infile_params = "/home/tanu/git/Data/streptomycin/output/gid_comb_stab_struc_params.csv" +mcsm_comb_data = read.csv(infile_params, header = T) + +pd_df = plotting_data(df = mcsm_comb_data, lig_dist_cutoff = 10) +my_df = pd_df[[1]] +my_df_u = pd_df[[2]] +my_df_u_lig = pd_df[[3]] +dup_muts = pd_df[[4]] +#=============================================================== \ No newline at end of file