adde format_results_dynamut2.py and ran shiny scripts for barplots

This commit is contained in:
Tanushree Tunstall 2021-08-19 16:25:38 +01:00
parent 9cb33ed67b
commit c0c30fd527
9 changed files with 235 additions and 59 deletions

View file

@ -30,8 +30,12 @@ site_snp_count_bp <- function (plotdf
, axis_text_size = 25
, axis_label_size = 22
, xaxis_title = "Number of nsSNPs"
, yaxis_title = "Number of Sites"){
, yaxis_title = "Number of Sites"
, title_colour = "chocolate4"
, subtitle_text = NULL
, subtitle_size = 20
, subtitle_colour = "pink")
{
# dim of plotdf
cat(paste0("\noriginal df dimensions:"
, "\nNo. of rows:", nrow(plotdf)
@ -83,9 +87,9 @@ site_snp_count_bp <- function (plotdf
# FIXME: should really be legend title
# but atm being using as plot title
my_leg_title = paste0("Total nsSNPs:", tot_muts
, ", Total no. of nsSNPs sites:", tot_sites)
bp_plot_title = my_leg_title
#my_leg_title
bp_plot_title = paste0("Total nsSNPs: ", tot_muts
, ", Total no. of nsSNPs sites: ", tot_sites)
#-------------
# start plot 2
@ -111,11 +115,16 @@ site_snp_count_bp <- function (plotdf
#, legend.position = c(0.73,0.8)
#, legend.text = element_text(size = leg_text_size)
#, legend.title = element_text(size = axis_label_size)
, plot.title = element_text(size = leg_text_size)) +
, plot.title = element_text(size = leg_text_size
, colour = title_colour)
, plot.subtitle = element_text(size = subtitle_size
, hjust = 0.5
, colour = subtitle_colour)) +
labs(title = bp_plot_title
, x = xaxis_title
, y = yaxis_title)
, subtitle = subtitle_text
, x = xaxis_title
, y = yaxis_title)
return(OutPlot_pos_count)
}