repurposed basic_barplots_foldx.R

This commit is contained in:
Tanushree Tunstall 2021-06-09 11:24:50 +01:00
parent 6f24fc1fac
commit d45a9499a2
3 changed files with 120 additions and 30 deletions

View file

@ -53,9 +53,29 @@ if(is.null(drug)|is.null(gene)) {
}
#########################################################
# call functions with relevant args
#drug = "streptomycin"
#gene = "gid"
#------------------------------------------
# import_dirs()
# should return the follwoing variables:
# datadir
# indir
# outdir
# plotdir
# dr_muts_col
# other_muts_col
# resistance_col
#--------------------------------------------
import_dirs(drug, gene)
#---------------------------------------------
# plotting_data()
# should return the following dfs:
# my_df
# my_df_u
# my_df_u_lig
# dup_muts
#----------------------------------------------
#infile = "/home/tanu/git/Data/streptomycin/output/gid_comb_stab_struc_params.csv"
#infile = ""
#if (!exists("infile") && exists("gene")){
if (!is.character(infile) && exists("gene")){
@ -65,9 +85,6 @@ if (!is.character(infile) && exists("gene")){
cat("\nInput file not specified, assuming filename: ", infile, "\n")
}
#infile = "/home/tanu/git/Data/streptomycin/output/gid_comb_stab_struc_params.csv"
#infile = ""
# Get the DFs out of plotting_data()
pd_df = plotting_data(infile)
my_df = pd_df[[1]]
@ -76,12 +93,6 @@ my_df_u_lig = pd_df[[3]]
dup_muts = pd_df[[4]]
#########################################################
# This script: should return the following dfs, directories and variables
# my_df
# my_df_u
# my_df_u_lig
# dup_muts
cat(paste0("Directories imported:"
, "\ndatadir:", datadir
, "\nindir:", indir
@ -94,7 +105,7 @@ cat(paste0("Directories imported:"
#, "\ngene_match:", gene_match
#, "\nLength of upos:", length(upos)
#, "\nAngstrom symbol:", angstroms_symbol))
#=======================================================================
#=======================================================================
#=======
# output
#=======
@ -117,7 +128,7 @@ df = my_df_u
str(df)
#=======================================================================
#****************
# Plot 1:Count of stabilising and destabilsing muts
# Plot 1: Count of stabilising and destabilsing muts
#****************
svg(plot_basic_bp_duet)