moved all test scripts for functions to tests/
This commit is contained in:
parent
2ee66c770b
commit
03031d2eb6
15 changed files with 162 additions and 776 deletions
35
scripts/functions/tests/test_plotting_data.R
Normal file
35
scripts/functions/tests/test_plotting_data.R
Normal file
|
@ -0,0 +1,35 @@
|
|||
#!/usr/bin/env Rscript
|
||||
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
|
||||
, ligand_dist_colname = 'ligand_distance'
|
||||
, 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]]
|
||||
########################################################################
|
||||
# End of script
|
||||
########################################################################
|
Loading…
Add table
Add a link
Reference in a new issue