add consurf-only scripts
This commit is contained in:
parent
9bc18169cf
commit
a405cd8035
11 changed files with 339 additions and 15 deletions
54
scripts/plotting/plotting_thesis/katg/consurf-plot.R
Normal file
54
scripts/plotting/plotting_thesis/katg/consurf-plot.R
Normal file
|
@ -0,0 +1,54 @@
|
|||
# katg ONLY
|
||||
source("~/git/LSHTM_analysis/config/katg.R")
|
||||
source("~/git/LSHTM_analysis/scripts/plotting/get_plotting_dfs.R")
|
||||
source("~/git/LSHTM_analysis/scripts/plotting/plotting_thesis/katg/basic_barplots_katg.R")
|
||||
|
||||
outdir_images="/home/sethp/git/Writing/thesis/tex/images-corrected/katg/"
|
||||
|
||||
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()
|
Loading…
Add table
Add a link
Reference in a new issue