diff --git a/scripts/functions/plotting_globals.R b/scripts/functions/plotting_globals.R index 1ff55fc..6e27ccf 100644 --- a/scripts/functions/plotting_globals.R +++ b/scripts/functions/plotting_globals.R @@ -11,8 +11,6 @@ # output: dir names for input and output files import_dirs <- function(drug, gene) { - gene_match = paste0(gene,"_p.") - cat(gene_match) #============================ # directories and variables @@ -26,6 +24,7 @@ import_dirs <- function(drug, gene) { dr_muts_col <<- paste0('dr_mutations_', drug) other_muts_col <<- paste0('other_mutations_', drug) resistance_col <<- "drtype" + gene_match <<- paste0(gene,"_p.") } @@ -58,4 +57,4 @@ mcsm_red1 <<- "#f8766d" mcsm_mid <<- "white" # middle mcsm_blue1 <<- "#00bfc4" -mcsm_blue2 <<- "#007d85" # most positive \ No newline at end of file +mcsm_blue2 <<- "#007d85" # most positive diff --git a/scripts/plotting/basic_barplots.R b/scripts/plotting/basic_barplots.R index 9abd2f6..2da7104 100755 --- a/scripts/plotting/basic_barplots.R +++ b/scripts/plotting/basic_barplots.R @@ -8,7 +8,6 @@ setwd("~/git/LSHTM_analysis/scripts/plotting") getwd() - # load libraries #source("Header_TT.R") library(ggplot2) @@ -88,14 +87,15 @@ my_df_u_lig = pd_df[[3]] dup_muts = pd_df[[4]] cat(paste0("Directories imported:" - , "\ndatadir:", datadir - , "\nindir:", indir - , "\noutdir:", outdir - , "\nplotdir:", plotdir)) + , "\ndatadir:" , datadir + , "\nindir:" , indir + , "\noutdir:" , outdir + , "\nplotdir:" , plotdir)) cat(paste0("\nVariables imported:" - , "\ndrug:", drug - , "\ngene:", gene + , "\ndrug:" , drug + , "\ngene:" , gene + , "\ngene match:" , gene_match , "\n")) #======================================================================= #=======