replaced single quotes with double in R scripts
This commit is contained in:
parent
eed3450236
commit
8a8790a7d1
5 changed files with 113 additions and 113 deletions
|
@ -1,5 +1,5 @@
|
|||
getwd()
|
||||
setwd('~/git/LSHTM_analysis/scripts/plotting')
|
||||
setwd("~/git/LSHTM_analysis/scripts/plotting")
|
||||
getwd()
|
||||
|
||||
#########################################################
|
||||
|
@ -11,8 +11,8 @@ getwd()
|
|||
# 1: Installing and loading required packages and functions
|
||||
############################################################
|
||||
|
||||
#source('Header_TT.R')
|
||||
source('barplot_colour_function.R')
|
||||
#source("Header_TT.R")
|
||||
source("barplot_colour_function.R")
|
||||
|
||||
############################################################
|
||||
# 2: Read file: struct params data with columns containing
|
||||
|
@ -134,7 +134,7 @@ df$group <- paste0(df$duet_outcome, "_", my_grp, sep = "")
|
|||
|
||||
# Call the function to create the palette based on the group defined above
|
||||
colours <- ColourPalleteMulti(df, "duet_outcome", "my_grp")
|
||||
print(paste0('Colour palette generated for: ', length(colours), ' colours'))
|
||||
print(paste0("Colour palette generated for: ", length(colours), " colours"))
|
||||
my_title = "Protein stability (DUET)"
|
||||
|
||||
#========================
|
||||
|
@ -158,12 +158,12 @@ my_yats = 18
|
|||
#******************
|
||||
# plot name and location
|
||||
# outdir/ (should be imported from reading file)
|
||||
print(paste0('plot will be in:', outdir))
|
||||
print(paste0("plot will be in:", outdir))
|
||||
|
||||
bp_aa_subcols_duet = "barplot_acoloured_PS.svg"
|
||||
plot_bp_aa_subcols_duet = paste0(outdir, "/plots/", bp_aa_subcols_duet)
|
||||
|
||||
print(paste0('plot name:', plot_bp_aa_subcols_duet))
|
||||
print(paste0("plot name:", plot_bp_aa_subcols_duet))
|
||||
|
||||
svg(plot_bp_aa_subcols_duet, width = 26, height = 4)
|
||||
|
||||
|
@ -176,13 +176,13 @@ outPlot = g +
|
|||
, clip = "off") +
|
||||
geom_bar(aes(fill = group), colour = "grey") +
|
||||
scale_fill_manual(values = colours
|
||||
, guide = 'none') +
|
||||
, guide = "none") +
|
||||
geom_tile(aes(,-0.8, width = 0.95, height = 0.85)
|
||||
, fill = df$lab_bg) +
|
||||
geom_tile(aes(,-1.2, width = 0.95, height = -0.2)
|
||||
, fill = df$lab_bg2) +
|
||||
|
||||
# Here it's important to specify that your axis goes from 1 to max number of levels
|
||||
# Here it"s important to specify that your axis goes from 1 to max number of levels
|
||||
theme(axis.text.x = element_text(size = my_xats
|
||||
, angle = 90
|
||||
, hjust = 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue