changes made to combining_dfs_plotting.R

This commit is contained in:
Tanushree Tunstall 2021-06-23 16:15:15 +01:00
parent 4f4734f565
commit 8277b489d6
9 changed files with 258 additions and 126 deletions

View file

@ -10,21 +10,21 @@
# input args: 'drug' and 'gene'
# output: dir names for input and output files
import_dirs <- function(drug, gene) {
import_dirs <- function(drug_name, gene_name) {
#============================
# directories and variables
#============================
datadir <<- paste0("~/git/Data/")
indir <<- paste0(datadir, drug, "/input")
outdir <<- paste0("~/git/Data/", drug, "/output")
plotdir <<- paste0("~/git/Data/", drug, "/output/plots")
indir <<- paste0(datadir, drug_name, "/input")
outdir <<- paste0("~/git/Data/", drug_name, "/output")
plotdir <<- paste0("~/git/Data/", drug_name, "/output/plots")
dr_muts_col <<- paste0('dr_mutations_', drug)
other_muts_col <<- paste0('other_mutations_', drug)
dr_muts_col <<- paste0('dr_mutations_', drug_name)
other_muts_col <<- paste0('other_mutations_', drug_name)
resistance_col <<- "drtype"
gene_match <<- paste0(gene,"_p.")
gene_match <<- paste0(gene_name,"_p.")
}
@ -37,20 +37,17 @@ import_dirs <- function(drug, gene) {
#==================
# Angstroms symbol
#==================
angstroms_symbol <<- "\u212b"
#cat(paste0("There are ", nrow(my_df_u_lig), " sites lying within 10", angstroms_symbol, " of the ligand\n"))
#===============
# Delta symbol
#===============
delta_symbol <<- "\u0394"; delta_symbol
#==========
# Colours
#==========
mcsm_red2 <<- "#ae301e" # most negative
mcsm_red1 <<- "#f8766d"
@ -58,3 +55,4 @@ mcsm_mid <<- "white" # middle
mcsm_blue1 <<- "#00bfc4"
mcsm_blue2 <<- "#007d85" # most positive
#########################################################