LSHTM_analysis/scripts/functions/plotting_globals.R

67 lines
1.8 KiB
R

#!/usr/bin/env Rscript
#########################################################
# TASK: importing global variable for plotting
# import_dirs()
# other global variables
#########################################################
# import_dirs(): similar to mkdirs from python script in repo.
# input args: 'drug' and 'gene'
# output: dir names for input and output files
import_dirs <- function(drug_name, gene_name) {
#============================
# directories and variables
#============================
datadir <<- paste0("~/git/Data/")
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_name)
other_muts_col <<- paste0('other_mutations_', drug_name)
gene_match <<- paste0(gene_name,"_p.")
}
# Other globals
#=====================
# Resistance colname
#=====================
resistance_col <<- "drtype"
#===============================
# mcsm ligand distance cut off
#===============================
LigDist_colname <<- "ligand_distance"
LigDist_cutoff <<- 10
DistCutOff <<- 10
ppi2Dist_colname <<- "interface_dist"
naDist_colname <<- "nca_distance" # added it
#==================
# Angstroms symbol
#==================
angstroms_symbol <<- "\u212b"
#===============
# Delta symbol
#===============
delta_symbol <<- "\u0394"; delta_symbol
stability_suffix <- paste0(delta_symbol, delta_symbol, "G")
#==========
# Colours
#==========
mcsm_red2 <<- "#ae301e" # most negative
mcsm_red1 <<- "#f8766d"
mcsm_mid <<- "white" # middle
mcsm_blue1 <<- "#00bfc4"
mcsm_blue2 <<- "#007d85" # most positive
#########################################################