colour changes
This commit is contained in:
parent
c6a720770d
commit
c8f3ddf892
5 changed files with 34 additions and 17 deletions
|
@ -124,6 +124,8 @@ bp_stability_hmap <- function(plot_df = merged_df3
|
|||
, axis.title.y = element_text(size = my_yaxts )
|
||||
, plot.title = element_text(size = my_pts
|
||||
, hjust = 0.5)
|
||||
, panel.grid = element_blank()
|
||||
, panel.background = element_rect(fill = "transparent", colour=NA)
|
||||
) +
|
||||
|
||||
labs(title = p_title
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
generate_distance_colour_map = function(plot_df,
|
||||
xvar_colname = "position",
|
||||
lig_dist_colname = "ligand_distance",
|
||||
lig_dist_colours = c("green", "yellow", "orange", "red"),
|
||||
#lig_dist_colours = c("green", "yellow", "orange", "red"),
|
||||
lig_dist_colours = c("tan", "black"),
|
||||
debug = TRUE
|
||||
)
|
||||
{
|
||||
|
@ -74,9 +75,9 @@ generate_distance_legend = function(plot_df,
|
|||
geom_tile(aes(fill = .data[[lig_dist_colname]])
|
||||
, colour = "white") +
|
||||
scale_fill_gradient2(midpoint = lig_mean
|
||||
, low = "green"
|
||||
, mid = "yellow"
|
||||
, high = "red"
|
||||
, low = "tan"
|
||||
, mid = "grey50"
|
||||
, high = "black"
|
||||
, breaks = labels
|
||||
, limits = c(lig_min, lig_max)
|
||||
, labels = labelsD
|
||||
|
|
|
@ -201,7 +201,7 @@ LogoPlotSnps <- function(plot_df
|
|||
cat('\nSelected colour scheme:', my_logo_col
|
||||
, "\nUsing grey theme")
|
||||
|
||||
theme_bgc = "grey"
|
||||
theme_bgc = "white"
|
||||
xfont_bgc = "black"
|
||||
yfont_bgc = "black"
|
||||
xtt_col = "black"
|
||||
|
|
|
@ -31,20 +31,21 @@ position_annotation=function(plot_df, bg="transparent"){
|
|||
scale_x_discrete("Position", labels=factor(plot_df$position)) +
|
||||
scale_color_manual(values = c(
|
||||
"brown"="brown",
|
||||
"purple"="purple",
|
||||
"green"="green",
|
||||
"transparent"="transparent",
|
||||
"blue"="blue", "cyan"="cyan",
|
||||
"cornflowerblue"="cornflowerblue"
|
||||
"slategrey"="slategrey",
|
||||
"navyblue"="navyblue",
|
||||
"purple"="purple"
|
||||
),
|
||||
expand=c(0,0)
|
||||
) +
|
||||
scale_fill_manual(values = c(
|
||||
"brown"="brown",
|
||||
"purple"="purple",
|
||||
"green"="green",
|
||||
"transparent"="transparent",
|
||||
"blue"="blue",
|
||||
"cyan"="cyan",
|
||||
"cornflowerblue"="cornflowerblue"
|
||||
"slategrey"="slategrey",
|
||||
"navyblue"="navyblue",
|
||||
"purple"="purple"
|
||||
),
|
||||
expand=c(0,0)
|
||||
) +
|
|
@ -321,12 +321,25 @@ svg('/tmp/foo.svg', width=10, height=10, )
|
|||
|
||||
corr_plotting_df = corr_df_ps
|
||||
|
||||
ggpairs(corr_plotting_df, columns = 1:(ncol(corr_plotting_df)-1)
|
||||
, upper = list(continuous = wrap('cor', method = "spearman"))
|
||||
, aes(colour = factor(dst_mode), alpha = 0.5)
|
||||
, title="correlogram with ggpairs()") +
|
||||
ggpairs(corr_plotting_df, columns = 1:(ncol(corr_plotting_df)-1),
|
||||
upper = list(continuous = wrap('cor',
|
||||
method = "spearman",
|
||||
title="ρ",
|
||||
digits=2,
|
||||
title_args=c(colour="black")
|
||||
)
|
||||
),
|
||||
lower = list(
|
||||
continuous = wrap("points", alpha = 0.7, size=0.5),
|
||||
combo = wrap("dot", alpha = 0.7, size=0.5)
|
||||
),
|
||||
aes(colour = factor(ifelse(corr_plotting_df$dst_mode==0, "S", "R")), alpha = 0.5),
|
||||
title="Stability") +
|
||||
scale_colour_manual(values = c("red", "blue")) +
|
||||
scale_fill_manual(values = c("red", "blue"))
|
||||
scale_fill_manual(values = c("red", "blue")) +
|
||||
theme(
|
||||
text = element_text(size=12, face="bold")
|
||||
)
|
||||
|
||||
dev.off()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue