From f949592dd8c0405b18008fa41196518f0c9ad05e Mon Sep 17 00:00:00 2001 From: Tanushree Tunstall Date: Mon, 5 Sep 2022 16:01:21 +0100 Subject: [PATCH] added consurf_colours_no_isd to ensure consurf plots are not messed up in the absesnce of 0 categ --- scripts/Header_TT.R | 13 +++++++++++++ .../plotting_thesis/pnca/basic_barplots_pnca.R | 5 ++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/scripts/Header_TT.R b/scripts/Header_TT.R index 9f5f735..935f5ec 100755 --- a/scripts/Header_TT.R +++ b/scripts/Header_TT.R @@ -249,6 +249,19 @@ consurf_colours = c( , "9" = rgb(0.63,0.16,0.37) ) +consurf_colours_no_isd = c( + #"0" = rgb(1.00,1.00,0.59) + "1" = rgb(0.04,0.49,0.51) + , "2" = rgb(0.29,0.69,0.75) + , "3" = rgb(0.65,0.86,0.90) + , "4" = rgb(0.84,0.94,0.94) + , "5" = rgb(1.00,1.00,1.00) + , "6" = rgb(0.98,0.92,0.96) + , "7" = rgb(0.98,0.78,0.86) + , "8" = rgb(0.94,0.49,0.67) + , "9" = rgb(0.63,0.16,0.37) +) + ################################################## # Function name clashes with plyr and dplyr diff --git a/scripts/plotting/plotting_thesis/pnca/basic_barplots_pnca.R b/scripts/plotting/plotting_thesis/pnca/basic_barplots_pnca.R index ef114a1..d8dd304 100644 --- a/scripts/plotting/plotting_thesis/pnca/basic_barplots_pnca.R +++ b/scripts/plotting/plotting_thesis/pnca/basic_barplots_pnca.R @@ -231,6 +231,9 @@ posC_all = site_snp_count_bp(plotdf = df3 , axis_label_size = axis_label_size) posC_all ################################################################## +#consurf_colours +consurf_colours_no_isd + consurfP = stability_count_bp(plotdf = df3 , df_colname = "consurf_outcome" #, leg_title = "ConSurf" @@ -238,7 +241,7 @@ consurfP = stability_count_bp(plotdf = df3 , yaxis_title = "Number of nsSNPs" , leg_position = "top" , subtitle_text = "ConSurf" - , bar_fill_values = consurf_colours # from globals + , bar_fill_values = consurf_colours_no_isd # from globals , subtitle_colour= "black" , sts = sts , lts = lts