From 2e29cf80119a7df28bd275174fdc498d02196ec9 Mon Sep 17 00:00:00 2001 From: Tanushree Tunstall Date: Mon, 15 Aug 2022 20:39:35 +0100 Subject: [PATCH] config files --- config/pnca.R | 2 ++ scripts/functions/bp_subcolours.R | 5 +++-- scripts/functions/logoP_snp.R | 23 ++++++++++++++--------- 3 files changed, 19 insertions(+), 11 deletions(-) diff --git a/config/pnca.R b/config/pnca.R index 1af54e2..09a988c 100644 --- a/config/pnca.R +++ b/config/pnca.R @@ -52,6 +52,8 @@ cat("\n===================================================" ############################################################## # var for position customisation for plots aa_pos_lig1 = aa_pos_fe +aa_pos_lig2 = NULL +aa_pos_lig3 = NULL #aa_pos_lig2 = aa_pos_catalytic #aa_pos_lig3 = aa_pos_hbond tile_map=data.frame(tile=c("PZA","DSL","CDL","Ca"), diff --git a/scripts/functions/bp_subcolours.R b/scripts/functions/bp_subcolours.R index 836fc2c..45842a3 100755 --- a/scripts/functions/bp_subcolours.R +++ b/scripts/functions/bp_subcolours.R @@ -97,8 +97,9 @@ bp_stability_hmap <- function(plot_df = merged_df3 # Generate the subcols barplot cowplot::plot_grid( ggplot(plot_df, aes_string(x = xvar_colname - # , ordered = T) - )) + + #, ordered = T + ) + ) + geom_bar(aes(fill = group) , colour = "grey", size=0.125) + diff --git a/scripts/functions/logoP_snp.R b/scripts/functions/logoP_snp.R index 808c211..7e13acd 100644 --- a/scripts/functions/logoP_snp.R +++ b/scripts/functions/logoP_snp.R @@ -37,8 +37,8 @@ LogoPlotSnps <- function(plot_df , omit_snp_count = c(0) # can be 1, 2, etc. , my_logo_col = "chemistry" , x_lab = "Position" - , y_lab = "Count" - , x_ats = 7 # text size + , y_lab = "nsSNP Count" + , x_ats = 6 # text size , x_tangle = 90 # text angle , y_ats = 10 , y_tangle = 0 @@ -237,17 +237,21 @@ LogoPlotSnps <- function(plot_df , colour = xfont_bgc #, margin = margin(t = 0.1) ) - , axis.text.y = element_text(size = y_ats - , angle = y_tangle - , hjust = 1 - , vjust = -1.0 - , colour = yfont_bgc) + , axis.text.y = element_blank() + # , axis.text.y = element_text(size = y_ats + # , angle = y_tangle + # , hjust = 1 + # , vjust = -1.0 + # , colour = yfont_bgc) # , axis.title.x = element_text(size = x_tts # , colour = xtt_col) , axis.title.x = element_blank() , axis.title.y = element_text(size = y_tts , angle = 90 - , colour = ytt_col) + , colour = ytt_col + , margin = margin(t = 0, r = 0, b = 20, l = 0) + #, hjust = -2 + ) , plot.background = element_rect(fill = theme_bgc, colour=NA) ) + @@ -269,11 +273,12 @@ LogoPlotSnps <- function(plot_df , legend.position = "none" , axis.text.x = element_blank() , axis.text.y = element_blank() + #, axis.text.y = element_text() , axis.title.x = element_blank() , axis.title.y = element_blank() , plot.background = element_rect(fill = theme_bgc, colour=NA) ) + - labs(x=NULL, y=NULL) + labs(x=NULL, y="WT") anno_bar = position_annotation(plot_df, bg = theme_bgc,