gidb_dev #1

Closed
tanu wants to merge 386 commits from gidb_dev into master
2 changed files with 31 additions and 14 deletions
Showing only changes of commit 9784cba232 - Show all commits

View file

@ -20,7 +20,7 @@ library(ggplot2)
library(data.table)
source("barplot_colour_function.R")
#source("subcols_axis.R")
source("subcols_axis_PS.R")
source("subcols_axis.R")
# should return the following dfs, directories and variables
# mut_pos_cols
@ -218,7 +218,7 @@ svg(plot_bp_aa_subcols_ligand, width = 26, height = 4)
g = ggplot(df, aes(factor(position, ordered = T)))
outPlot = g +
OutPlot = g +
coord_cartesian(xlim = c(1, my_xlim)
#, ylim = c(0, 6)
, ylim = c(0, max(snp_count))
@ -249,10 +249,10 @@ outPlot = g +
, axis.ticks.x = element_blank()) +
labs(title = ""
#title = my_title
, x = "position"
, x = "Position"
, y = "Frequency")
print(outPlot)
print(OutPlot)
dev.off()
#!!!!!!!!!!!!!!!!

View file

@ -219,6 +219,7 @@ p2 = g2 +
, colour = "black"
, fill = "lightgray"
, stat = "identity") +
scale_y_continuous(limits = c(0, 450))+
theme(axis.text.x = element_blank()
, axis.text.y = element_text(size = my_ats
, angle = 0
@ -235,17 +236,33 @@ p2
########################################################################
# end of DUET barplots #
########################################################################
#=======
# output
#=======
ps_plots_combined = "af_or_combined_PS.svg"
plot_ps_plots_combined = paste0(plotdir,"/", ps_plots_combined )
#============================
# combined plot 1: UNlabelled
#============================
ps_combined = "af_or_combined_PS.svg"
plot_ps_combined = paste0(plotdir,"/", ps_combined)
cat("combined plot Unlabelled:", plot_ps_combined)
svg(plot_ps_plots_combined , width = 26, height = 12)
#theme_set(theme_gray()) # to preserve default theme
printFile = cowplot::plot_grid(p1, p2, p3
svg(plot_ps_combined , width = 26, height = 12)
OutPlot_combined = cowplot::plot_grid(p1, p2, p3
, ncol = 1
, align = 'v')
printFile
OutPlot_combined
dev.off()
#============================
# combined plot 2: labelled
#============================
ps_combined_labelled = "af_or_combined_PS_labelled.svg"
plot_ps_combined_labelled = paste0(plotdir,"/", ps_combined_labelled)
cat("combined plot Labelled:", plot_ps_combined_labelled)
svg(plot_ps_combined_labelled , width = 26, height = 12)
OutPlot_combined_labelled = cowplot::plot_grid(p1, p2, p3
, ncol = 1
, labels = c("(a)", "(b)", "(c)")
, label_size = 21
, align = 'v'
, hjust = -0.4)
OutPlot_combined_labelled
dev.off()