54 lines
1.8 KiB
R
54 lines
1.8 KiB
R
# gid ONLY
|
|
source("~/git/LSHTM_analysis/config/gid.R")
|
|
source("~/git/LSHTM_analysis/scripts/plotting/get_plotting_dfs.R")
|
|
source("~/git/LSHTM_analysis/scripts/plotting/plotting_thesis/gid/basic_barplots_gid.R")
|
|
|
|
outdir_images="/home/sethp/git/Writing/thesis/tex/images-corrected/gid/"
|
|
|
|
w=4.5
|
|
h=4.5
|
|
|
|
consurfP = stability_count_bp(plotdf = df3
|
|
, df_colname = "consurf_outcome"
|
|
, yaxis_title = "Number of SAVs"
|
|
, leg_position = "none"
|
|
#, subtitle_text = "ConSurf"
|
|
, bar_fill_values = consurf_colours
|
|
, subtitle_colour= "black"
|
|
, sts = sts
|
|
, lts = lts
|
|
, ats = ats
|
|
, als = als
|
|
, ltis = ltis
|
|
, geom_ls = geom_ls)
|
|
|
|
consurf_legend = get_legend(
|
|
ggplot(df3, aes(factor(consurf_outcome))) +
|
|
geom_tile(aes(
|
|
fill = consurf_outcome, y=0
|
|
)
|
|
)+
|
|
|
|
scale_fill_manual(
|
|
values=consurf_colours,
|
|
labels=c("0\nND","1\nVar","2","3","4","5\nAvg","6","7","8","9\nCons"),
|
|
guide=guide_legend(title="Consurf",
|
|
title.position = "top",
|
|
title.hjust = 0.5,
|
|
label.position = "bottom",
|
|
nrow = 1
|
|
)
|
|
)
|
|
)
|
|
|
|
consurf_out=cowplot::plot_grid(consurf_legend, consurfP,ncol=1,rel_heights = c(2.5,12))
|
|
|
|
conCLP = paste0(outdir_images
|
|
,tolower(gene)
|
|
,"_consurf_BP.jpg")
|
|
|
|
print(paste0("plot filename:", conCLP))
|
|
jpeg(conCLP, units = "in", width = w, height = h, res = 300 )
|
|
consurf_out
|
|
|
|
dev.off()
|