more of the previous thing

This commit is contained in:
Tanushree Tunstall 2022-08-03 20:51:32 +01:00
parent bdbc97c40a
commit 41c4996426

View file

@ -28,8 +28,8 @@ wideP_consurf <- function(plot_df
, "1": "Variable" , "1": "Variable"
, "2", "3", "4", "5", "6", "7", "8" , "2", "3", "4", "5", "6", "7", "8"
, "9": "Conserved") , "9": "Conserved")
, panel_col = "black" , panel_col = "white"
, panel_col_fill = "black" , panel_col_fill = "white"
# axes title and label sizes # axes title and label sizes
, x_axls = 12 # x-axis label size , x_axls = 12 # x-axis label size
@ -241,7 +241,7 @@ wideP_consurf <- function(plot_df
, colour = sprintf("factor(%s)", yvar_colourN_colname) , colour = sprintf("factor(%s)", yvar_colourN_colname)
)) ))
"if SPECIAL do SPECIAL THING, otherwise do NORMAL THING" #"if SPECIAL do SPECIAL THING, otherwise do NORMAL THING"
if (plot_type == "bar"){ if (plot_type == "bar"){
g0 = g + g0 = g +
geom_bar(stat = "identity") geom_bar(stat = "identity")
@ -282,8 +282,8 @@ wideP_consurf <- function(plot_df
, axis.title.x = element_text(size = x_axls) , axis.title.x = element_text(size = x_axls)
, axis.title.y = element_text(size = y_axls ) , axis.title.y = element_text(size = y_axls )
, panel.background = element_rect(fill = panel_col_fill, color = panel_col) , panel.background = element_rect(fill = panel_col_fill, color = panel_col)
, panel.grid.major = element_line(color = "black") #, panel.grid.major = element_line(color = "black")
, panel.grid.minor = element_line(color = "black") #, panel.grid.minor = element_line(color = "black")
, plot.title = element_text(size = pts , plot.title = element_text(size = pts
, hjust = 0.5) , hjust = 0.5)
, plot.margin = margin(t = t_margin , plot.margin = margin(t = t_margin
@ -338,7 +338,7 @@ wideP_consurf <- function(plot_df
cat("\nColouring x-axis aa based on", lig_dist_colname cat("\nColouring x-axis aa based on", lig_dist_colname
, "\nNo. of colours:", n_colours) , "\nNo. of colours:", n_colours)
g2 = g1 + geom_tile(aes(, 2 g2 = g1 + geom_tile(aes(, tpos0
# g2 = g1 + geom_tile(aes(, tpos0 # g2 = g1 + geom_tile(aes(, tpos0
, width = tW0 , width = tW0
@ -373,7 +373,8 @@ wideP_consurf <- function(plot_df
cat("\nDoing Plot with 3 ligands") cat("\nDoing Plot with 3 ligands")
} }
out = out + geom_tile(aes(,tpos3 #out = out + geom_tile(aes(,tpos3
out = out + geom_tile(aes(,2
, width = tW , width = tW
, height = tH ) , height = tH )
, fill = plot_df[[aa_colour_colname3]] , fill = plot_df[[aa_colour_colname3]]
@ -504,3 +505,13 @@ wideP_consurf <- function(plot_df
#return(out2) #return(out2)
} }
wideP_consurf(
merged_df3,
A_xvar_aa = T,
active_aa_pos = active_aa_pos,
aa_pos_lig1 = aa_pos_lig1,
aa_pos_lig2 = aa_pos_lig2,
aa_pos_lig3 = aa_pos_lig3,
debug=T)