added katg tables
This commit is contained in:
parent
d5da923a74
commit
6441be21ab
8 changed files with 31 additions and 200 deletions
|
@ -1,176 +0,0 @@
|
|||
# source dm_om_plots.R
|
||||
source("/home/tanu/git/LSHTM_analysis/scripts/plotting/plotting_thesis/dm_om_plots.R")
|
||||
|
||||
##### plots to combine ####
|
||||
duetP
|
||||
foldxP
|
||||
deepddgP
|
||||
dynamut2P
|
||||
genomicsP
|
||||
consurfP
|
||||
proveanP
|
||||
snap2P
|
||||
mcsmligP
|
||||
mcsmlig2P
|
||||
mcsmppi2P
|
||||
|
||||
# Plot labels
|
||||
tit1 = "Stability changes"
|
||||
tit2 = "Genomic measure"
|
||||
tit3 = "Distance to partners"
|
||||
tit4 = "Evolutionary Conservation"
|
||||
tit5 = "Affinity changes"
|
||||
pt_size = 30
|
||||
|
||||
theme_georgia <- function(...) {
|
||||
theme_gray(base_family = "sans", ...) +
|
||||
theme(plot.title = element_text(face = "bold"))
|
||||
}
|
||||
|
||||
|
||||
title_theme <- calc_element("plot.title", theme_georgia())
|
||||
|
||||
pt1 = ggdraw() +
|
||||
draw_label(
|
||||
tit1,
|
||||
fontfamily = title_theme$family,
|
||||
fontface = title_theme$face,
|
||||
#size = title_theme$size
|
||||
size = pt_size
|
||||
)
|
||||
|
||||
pt2 = ggdraw() +
|
||||
draw_label(
|
||||
tit2,
|
||||
fontfamily = title_theme$family,
|
||||
fontface = title_theme$face,
|
||||
size = pt_size
|
||||
)
|
||||
|
||||
pt3 = ggdraw() +
|
||||
draw_label(
|
||||
tit3,
|
||||
fontfamily = title_theme$family,
|
||||
fontface = title_theme$face,
|
||||
size = pt_size
|
||||
)
|
||||
|
||||
pt4 = ggdraw() +
|
||||
draw_label(
|
||||
tit4,
|
||||
fontfamily = title_theme$family,
|
||||
fontface = title_theme$face,
|
||||
size = pt_size
|
||||
)
|
||||
|
||||
|
||||
pt5 = ggdraw() +
|
||||
draw_label(
|
||||
tit5,
|
||||
fontfamily = title_theme$family,
|
||||
fontface = title_theme$face,
|
||||
size = pt_size
|
||||
)
|
||||
|
||||
#======================
|
||||
# Output plot function
|
||||
#======================
|
||||
OutPlot_dm_om = function(x){
|
||||
|
||||
# dist b/w plot title and plot
|
||||
relH_tp = c(0.08, 0.92)
|
||||
|
||||
my_label_size = 25
|
||||
#----------------
|
||||
# Top panel
|
||||
#----------------
|
||||
top_panel = cowplot::plot_grid(
|
||||
cowplot::plot_grid(pt1,
|
||||
cowplot::plot_grid(duetP, foldxP, deepddgP, dynamut2P
|
||||
, nrow = 1
|
||||
, labels = c("A", "B", "C", "D")
|
||||
, label_size = my_label_size)
|
||||
, ncol = 1
|
||||
, rel_heights = relH_tp
|
||||
),
|
||||
NULL,
|
||||
cowplot::plot_grid(pt2,
|
||||
cowplot::plot_grid(genomicsP
|
||||
, nrow = 1
|
||||
, labels = c("E")
|
||||
, label_size = my_label_size)
|
||||
, ncol = 1
|
||||
, rel_heights = relH_tp
|
||||
),
|
||||
NULL,
|
||||
cowplot::plot_grid(pt3,
|
||||
cowplot::plot_grid( #distanceP
|
||||
distanceP_lig
|
||||
, distanceP_ppi2
|
||||
, nrow = 1
|
||||
, labels = c("F", "G")
|
||||
, label_size = my_label_size)
|
||||
, ncol = 1
|
||||
, rel_heights = relH_tp
|
||||
),
|
||||
nrow = 1,
|
||||
rel_widths = c(2/7, 0.1/7, 0.5/7, 0.1/7, 1/7)
|
||||
)
|
||||
|
||||
#----------------
|
||||
# Bottom panel
|
||||
#----------------
|
||||
bottom_panel = cowplot::plot_grid(
|
||||
cowplot::plot_grid(pt4,
|
||||
cowplot::plot_grid(consurfP, proveanP, snap2P
|
||||
, nrow = 1
|
||||
, labels = c("H", "I", "J")
|
||||
, label_size = my_label_size)
|
||||
, ncol = 1
|
||||
, rel_heights =relH_tp
|
||||
),NULL,
|
||||
cowplot::plot_grid(pt5,
|
||||
cowplot::plot_grid(mcsmligP
|
||||
, mcsmlig2P
|
||||
, mcsmppi2P
|
||||
, nrow = 1
|
||||
, labels = c("K", "L", "M")
|
||||
, label_size = my_label_size)
|
||||
, ncol = 1
|
||||
, rel_heights = relH_tp
|
||||
),NULL,
|
||||
nrow = 1,
|
||||
rel_widths = c(3/6,0.1/6,3/6, 0.1/6 )
|
||||
)
|
||||
|
||||
#-------------------------------
|
||||
# combine: Top and Bottom panel
|
||||
#-------------------------------
|
||||
cowplot::plot_grid (top_panel, bottom_panel
|
||||
, nrow =2
|
||||
, rel_widths = c(1, 1)
|
||||
, align = "hv")
|
||||
}
|
||||
|
||||
#=====================
|
||||
# OutPlot: svg and png
|
||||
#======================
|
||||
dm_om_combinedP = paste0(outdir_images
|
||||
,tolower(gene)
|
||||
,"_dm_om_all.svg")
|
||||
|
||||
cat("DM OM plots with stats:", dm_om_combinedP)
|
||||
svg(dm_om_combinedP, width = 32, height = 18)
|
||||
|
||||
OutPlot_dm_om()
|
||||
dev.off()
|
||||
|
||||
|
||||
dm_om_combinedP_png = paste0(outdir_images
|
||||
,tolower(gene)
|
||||
,"_dm_om_all.png")
|
||||
cat("DM OM plots with stats:", dm_om_combinedP_png)
|
||||
png(dm_om_combinedP_png, width = 32, height = 18, units = "in", res = 300)
|
||||
|
||||
OutPlot_dm_om()
|
||||
dev.off()
|
|
@ -1,4 +1,4 @@
|
|||
#source("~/git/LSHTM_analysis/config/embb.R")
|
||||
#source("~/git/LSHTM_analysis/config/katg.R")
|
||||
#source("~/git/LSHTM_analysis/scripts/plotting/plotting_colnames.R")
|
||||
#source("~/git/LSHTM_analysis/scripts/plotting/get_plotting_dfs.R")
|
||||
|
||||
|
@ -53,7 +53,7 @@ corr_plotdf = corr_data_extract(merged_df3
|
|||
|
||||
aff_dist_cols = colnames(corr_plotdf)[grep("Dist", colnames(corr_plotdf))]
|
||||
static_cols = c("Log10(MAF)"
|
||||
, "Log10(OR)"
|
||||
#, "Log10(OR)"
|
||||
)
|
||||
############################################################
|
||||
#=============================================
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue