From 19b820e3165156e6875baef7dd30702f9643c156 Mon Sep 17 00:00:00 2001 From: Tanushree Tunstall Date: Wed, 24 Aug 2022 20:55:36 +0100 Subject: [PATCH] corrected the pe colour mapping --- .../plotting_thesis/alr/basic_barplots_alr.R | 14 ++++---- .../alr/pe_sens_site_count_alr.R | 22 ++++++------- .../alr/prominent_effects_alr.R | 32 +++++++----------- .../gid/basic_barplots_gid_layout.R | 4 +-- .../gid/prominent_effects_gid.R | 33 +++++++------------ .../katg/basic_barplots_katg.R | 4 +-- .../katg/basic_barplots_katg_layout.R | 5 +-- .../katg/pe_sens_site_count_katg.R | 2 +- .../katg/prominent_effects_katg.R | 33 +++++++------------ .../rpob/prominent_effects_rpob.R | 2 +- 10 files changed, 61 insertions(+), 90 deletions(-) diff --git a/scripts/plotting/plotting_thesis/alr/basic_barplots_alr.R b/scripts/plotting/plotting_thesis/alr/basic_barplots_alr.R index a7b9371..0d5ce2a 100644 --- a/scripts/plotting/plotting_thesis/alr/basic_barplots_alr.R +++ b/scripts/plotting/plotting_thesis/alr/basic_barplots_alr.R @@ -7,21 +7,19 @@ #============= # Data: Input #============== -source("~/git/LSHTM_analysis/config/alr.R") -source("~/git/LSHTM_analysis/scripts/plotting/get_plotting_dfs.R") +#source("~/git/LSHTM_analysis/config/alr.R") +#source("~/git/LSHTM_analysis/scripts/plotting/get_plotting_dfs.R") #cat("\nSourced plotting cols as well:", length(plotting_cols)) - -#################################################### -class(merged_df3) - -df3 = subset(merged_df3, select = -c(pos_count)) - #======= # output #======= outdir_images = paste0("~/git/Writing/thesis/images/results/", tolower(gene), "/") cat("plots will output to:", outdir_images) +#################################################### +class(merged_df3) + +df3 = subset(merged_df3, select = -c(pos_count)) ########################################################## # blue, red bp sts = 8 diff --git a/scripts/plotting/plotting_thesis/alr/pe_sens_site_count_alr.R b/scripts/plotting/plotting_thesis/alr/pe_sens_site_count_alr.R index 397848e..6cf8c6b 100644 --- a/scripts/plotting/plotting_thesis/alr/pe_sens_site_count_alr.R +++ b/scripts/plotting/plotting_thesis/alr/pe_sens_site_count_alr.R @@ -3,17 +3,17 @@ source("/home/tanu/git/LSHTM_analysis/scripts/plotting/plotting_thesis/alr/sensi ############################################################## # PE count -#pe_colour_map = c("DD_lig" = "#f0e68c" # khaki -# , "SS_lig" = "#ffd700" # gold - -# , "DD_nucleic_acid"= "#d2b48c" # sandybrown -# , "SS_nucleic_acid"= "#a0522d" # sienna - -# , "DD_ppi2" = "#da70d6" # orchid -# , "SS_ppi2" = "#ff1493" # deeppink - -# , "DD_stability" = "#f8766d" # red -# , "SS_stability" = "#00BFC4") # blue +pe_colour_map = c("DD_lig" = "#f0e68c" # khaki + , "SS_lig" = "#ffd700" # gold + + , "DD_nucleic_acid"= "#d2b48c" # sandybrown + , "SS_nucleic_acid"= "#a0522d" # sienna + + , "DD_ppi2" = "#da70d6" # orchid + , "SS_ppi2" = "#ff1493" # deeppink + + , "DD_stability" = "#f8766d" # red + , "SS_stability" = "#00BFC4") # blue table(str_df_plot_cols$pe_effect_outcome) ############################################################## #=========== diff --git a/scripts/plotting/plotting_thesis/alr/prominent_effects_alr.R b/scripts/plotting/plotting_thesis/alr/prominent_effects_alr.R index 555b833..f7b05de 100644 --- a/scripts/plotting/plotting_thesis/alr/prominent_effects_alr.R +++ b/scripts/plotting/plotting_thesis/alr/prominent_effects_alr.R @@ -191,27 +191,17 @@ head(str_df_plot_cols) # colour based on effect table(str_df_plot_cols$pe_effect_outcome) -# colors = c("#ffd700" #gold -# , "#f0e68c" #khaki -# , "#da70d6"# orchid -# , "#ff1493"# deeppink -# , "#a0522d" #sienna -# , "#d2b48c" # tan -# , "#00BFC4" #, "#007d85" #blue -# , "#F8766D" )# red - -pe_colour_map = c("DD_lig" = "#ffd700" # gold - , "SS_lig" = "#f0e68c" # khaki - - , "DD_nucleic_acid"= "#a0522d" # sienna - , "SS_nucleic_acid"= "#d2b48c" # tan - - , "DD_ppi2" = "#da70d6" # orchid - , "SS_ppi2" = "#ff1493" # deeppink - - , "DD_stability" = "#f8766d" # red - , "SS_stability" = "#00BFC4") # blue - +pe_colour_map = c("DD_lig" = "#f0e68c" # khaki + , "SS_lig" = "#ffd700" # gold + + , "DD_nucleic_acid"= "#d2b48c" # sandybrown + , "SS_nucleic_acid"= "#a0522d" # sienna + + , "DD_ppi2" = "#da70d6" # orchid + , "SS_ppi2" = "#ff1493" # deeppink + + , "DD_stability" = "#f8766d" # red + , "SS_stability" = "#00BFC4") # blue #unlist(d[c('a', 'a', 'c', 'b')], use.names=FALSE) #map the colours diff --git a/scripts/plotting/plotting_thesis/gid/basic_barplots_gid_layout.R b/scripts/plotting/plotting_thesis/gid/basic_barplots_gid_layout.R index c8429ba..d93518b 100644 --- a/scripts/plotting/plotting_thesis/gid/basic_barplots_gid_layout.R +++ b/scripts/plotting/plotting_thesis/gid/basic_barplots_gid_layout.R @@ -2,11 +2,11 @@ # Data: Input #============== source("~/git/LSHTM_analysis/config/gid.R") - source("~/git/LSHTM_analysis/scripts/plotting/get_plotting_dfs.R") -#cat("\nSourced plotting cols as well:", length(plotting_cols)) +source("~/git/LSHTM_analysis/scripts/plotting/get_plotting_dfs.R") source("/home/tanu/git/LSHTM_analysis/scripts/plotting/plotting_thesis/gid/basic_barplots_gid.R") source("/home/tanu/git/LSHTM_analysis/scripts/plotting/plotting_thesis/gid/pe_sens_site_count_gid.R") +#cat("\nSourced plotting cols as well:", length(plotting_cols)) #======= # output diff --git a/scripts/plotting/plotting_thesis/gid/prominent_effects_gid.R b/scripts/plotting/plotting_thesis/gid/prominent_effects_gid.R index 65b3ba5..907c3f5 100644 --- a/scripts/plotting/plotting_thesis/gid/prominent_effects_gid.R +++ b/scripts/plotting/plotting_thesis/gid/prominent_effects_gid.R @@ -203,27 +203,18 @@ head(str_df_plot_cols) # colour based on effect table(str_df_plot_cols$pe_effect_outcome) -# colors = c("#ffd700" #gold -# , "#f0e68c" #khaki -# , "#da70d6"# orchid -# , "#ff1493"# deeppink -# , "#a0522d" #sienna -# , "#d2b48c" # tan -# , "#00BFC4" #, "#007d85" #blue -# , "#F8766D" )# red - -pe_colour_map = c("DD_lig" = "#ffd700" # gold - , "SS_lig" = "#f0e68c" # khaki - - , "DD_nucleic_acid"= "#a0522d" # sienna - , "SS_nucleic_acid"= "#d2b48c" # tan - - , "DD_ppi2" = "#da70d6" # orchid - , "SS_ppi2" = "#ff1493" # deeppink - - , "DD_stability" = "#f8766d" # red - , "SS_stability" = "#00BFC4") # blue - +pe_colour_map = c("DD_lig" = "#f0e68c" # khaki + , "SS_lig" = "#ffd700" # gold + + , "DD_nucleic_acid"= "#d2b48c" # sandybrown + , "SS_nucleic_acid"= "#a0522d" # sienna + + , "DD_ppi2" = "#da70d6" # orchid + , "SS_ppi2" = "#ff1493" # deeppink + + , "DD_stability" = "#f8766d" # red + , "SS_stability" = "#00BFC4") # blue + #unlist(d[c('a', 'a', 'c', 'b')], use.names=FALSE) #map the colours diff --git a/scripts/plotting/plotting_thesis/katg/basic_barplots_katg.R b/scripts/plotting/plotting_thesis/katg/basic_barplots_katg.R index 0ed96e5..50001a5 100644 --- a/scripts/plotting/plotting_thesis/katg/basic_barplots_katg.R +++ b/scripts/plotting/plotting_thesis/katg/basic_barplots_katg.R @@ -7,8 +7,8 @@ #============= # Data: Input #============== -source("~/git/LSHTM_analysis/config/katg.R") -source("~/git/LSHTM_analysis/scripts/plotting/get_plotting_dfs.R") +#source("~/git/LSHTM_analysis/config/katg.R") +#source("~/git/LSHTM_analysis/scripts/plotting/get_plotting_dfs.R") #cat("\nSourced plotting cols as well:", length(plotting_cols)) diff --git a/scripts/plotting/plotting_thesis/katg/basic_barplots_katg_layout.R b/scripts/plotting/plotting_thesis/katg/basic_barplots_katg_layout.R index 6ea7d0e..4001908 100644 --- a/scripts/plotting/plotting_thesis/katg/basic_barplots_katg_layout.R +++ b/scripts/plotting/plotting_thesis/katg/basic_barplots_katg_layout.R @@ -1,8 +1,9 @@ #============= # Data: Input #============== -#source("~/git/LSHTM_analysis/config/katg.R") -#source("~/git/LSHTM_analysis/scripts/plotting/get_plotting_dfs.R") +source("~/git/LSHTM_analysis/config/katg.R") +source("~/git/LSHTM_analysis/scripts/plotting/get_plotting_dfs.R") + source("/home/tanu/git/LSHTM_analysis/scripts/plotting/plotting_thesis/katg/basic_barplots_katg.R") source("/home/tanu/git/LSHTM_analysis/scripts/plotting/plotting_thesis/katg/pe_sens_site_count_katg.R") diff --git a/scripts/plotting/plotting_thesis/katg/pe_sens_site_count_katg.R b/scripts/plotting/plotting_thesis/katg/pe_sens_site_count_katg.R index d9391c7..235b8b6 100644 --- a/scripts/plotting/plotting_thesis/katg/pe_sens_site_count_katg.R +++ b/scripts/plotting/plotting_thesis/katg/pe_sens_site_count_katg.R @@ -3,7 +3,7 @@ source("/home/tanu/git/LSHTM_analysis/scripts/plotting/plotting_thesis/katg/sens ############################################################## # PE count -#pe_colour_map = c("DD_lig" = "#f0e68c" # khaki +#pe_colour_map = c("DD_lig" = "#f0e68c" # khaki # , "SS_lig" = "#ffd700" # gold # , "DD_nucleic_acid"= "#d2b48c" # sandybrown diff --git a/scripts/plotting/plotting_thesis/katg/prominent_effects_katg.R b/scripts/plotting/plotting_thesis/katg/prominent_effects_katg.R index 627bd58..eceed2c 100644 --- a/scripts/plotting/plotting_thesis/katg/prominent_effects_katg.R +++ b/scripts/plotting/plotting_thesis/katg/prominent_effects_katg.R @@ -191,27 +191,18 @@ head(str_df_plot_cols) # colour based on effect table(str_df_plot_cols$pe_effect_outcome) -# colors = c("#ffd700" #gold -# , "#f0e68c" #khaki -# , "#da70d6"# orchid -# , "#ff1493"# deeppink -# , "#a0522d" #sienna -# , "#d2b48c" # tan -# , "#00BFC4" #, "#007d85" #blue -# , "#F8766D" )# red - -pe_colour_map = c("DD_lig" = "#ffd700" # gold - , "SS_lig" = "#f0e68c" # khaki - - , "DD_nucleic_acid"= "#a0522d" # sienna - , "SS_nucleic_acid"= "#d2b48c" # tan - - , "DD_ppi2" = "#da70d6" # orchid - , "SS_ppi2" = "#ff1493" # deeppink - - , "DD_stability" = "#f8766d" # red - , "SS_stability" = "#00BFC4") # blue - +pe_colour_map = c("DD_lig" = "#f0e68c" # khaki + , "SS_lig" = "#ffd700" # gold + + , "DD_nucleic_acid"= "#d2b48c" # sandybrown + , "SS_nucleic_acid"= "#a0522d" # sienna + + , "DD_ppi2" = "#da70d6" # orchid + , "SS_ppi2" = "#ff1493" # deeppink + + , "DD_stability" = "#f8766d" # red + , "SS_stability" = "#00BFC4") # blue + #unlist(d[c('a', 'a', 'c', 'b')], use.names=FALSE) #map the colours diff --git a/scripts/plotting/plotting_thesis/rpob/prominent_effects_rpob.R b/scripts/plotting/plotting_thesis/rpob/prominent_effects_rpob.R index 6293e6e..cbe2831 100644 --- a/scripts/plotting/plotting_thesis/rpob/prominent_effects_rpob.R +++ b/scripts/plotting/plotting_thesis/rpob/prominent_effects_rpob.R @@ -252,7 +252,7 @@ table(str_df_plot_cols$pe_effect_outcome) # , "SS_stability" = "#00BFC4") # blue -pe_colour_map = c("DD_lig" = "#f0e68c" # khaki +pe_colour_map = c("DD_lig" = "#f0e68c" # khaki , "SS_lig" = "#ffd700" # gold , "DD_nucleic_acid"= "#d2b48c" # sandybrown