stuff
This commit is contained in:
parent
79b251047d
commit
c6f5a446c3
6 changed files with 56 additions and 55 deletions
|
@ -56,7 +56,8 @@ bp_stability_hmap <- function(plot_df = merged_df3
|
|||
, tW0 = 1
|
||||
, tH0 = 0.2,
|
||||
y_max_override = 1, # an override for tidily plotting multiple different-ranged plots together
|
||||
reorder_position = FALSE # enable to reorder according to plot_df$pos_count
|
||||
reorder_position = FALSE, # enable to reorder according to plot_df$pos_count
|
||||
...
|
||||
|
||||
|
||||
|
||||
|
@ -103,7 +104,8 @@ bp_stability_hmap <- function(plot_df = merged_df3
|
|||
active_aa_pos=active_aa_pos,
|
||||
aa_pos_lig1=aa_pos_lig1,
|
||||
aa_pos_lig2=aa_pos_lig2,
|
||||
aa_pos_lig3=aa_pos_lig3
|
||||
aa_pos_lig3=aa_pos_lig3,
|
||||
...
|
||||
)
|
||||
|
||||
subcols_plot = ggplot(plot_df) +
|
||||
|
|
|
@ -61,25 +61,12 @@ LogoPlotCustomH <- function(plot_df
|
|||
, leg_tts = 8 # leg title size
|
||||
, tpos0 = 0 # 0 is a magic number that does my sensible default
|
||||
, tW0 = 1
|
||||
, tH0 = 0.3
|
||||
, tH0 = 0.3,
|
||||
...
|
||||
)
|
||||
|
||||
{
|
||||
#################################
|
||||
# Data processing for logo plot
|
||||
#################################
|
||||
# plot_df = generate_distance_colour_map(plot_df, debug=TRUE)
|
||||
|
||||
# unique_colour_map = unique(plot_df[,c("position","ligD_colours")])
|
||||
# unique_colour_map = unique_colour_map[order(unique_colour_map$position), ]
|
||||
# rownames(unique_colour_map) = unique_colour_map$position
|
||||
#
|
||||
# unique_colour_map2 = unique_colour_map
|
||||
# unique_colour_map2$position=as.factor(unique_colour_map2$position)
|
||||
# unique_colour_map2$ligD_colours = as.factor(unique_colour_map2$ligD_colours)
|
||||
#
|
||||
|
||||
|
||||
|
||||
if (rm_empty_y){
|
||||
cat(paste0("Original Rows: ",nrow(plot_df)))
|
||||
plot_df = plot_df[!is.na(plot_df[y_axis_colname]),]
|
||||
|
@ -231,7 +218,8 @@ LogoPlotCustomH <- function(plot_df
|
|||
active_aa_pos=active_aa_pos,
|
||||
aa_pos_lig1=aa_pos_lig1,
|
||||
aa_pos_lig2=aa_pos_lig2,
|
||||
aa_pos_lig3=aa_pos_lig3
|
||||
aa_pos_lig3=aa_pos_lig3,
|
||||
...
|
||||
),
|
||||
|
||||
ncol=1, align='v', rel_heights = c(6,1)
|
||||
|
|
|
@ -51,7 +51,8 @@ LogoPlotSnps <- function(plot_df
|
|||
, tpos0 = 0 # 0 is a magic number that does my sensible default
|
||||
, tW0 = 1
|
||||
, tH0 = 0.2
|
||||
, debug=FALSE
|
||||
, debug=FALSE,
|
||||
...
|
||||
|
||||
)
|
||||
|
||||
|
@ -286,7 +287,8 @@ LogoPlotSnps <- function(plot_df
|
|||
active_aa_pos=active_aa_pos,
|
||||
aa_pos_lig1=aa_pos_lig1,
|
||||
aa_pos_lig2=aa_pos_lig2,
|
||||
aa_pos_lig3=aa_pos_lig3)
|
||||
aa_pos_lig3=aa_pos_lig3,
|
||||
...)
|
||||
|
||||
#aligned=align_plots(logo_top, logo_bottom, anno_bar, align='vh', axis='lr')
|
||||
cowplot::plot_grid(
|
||||
|
|
|
@ -186,5 +186,9 @@ position_annotation=function(plot_df,
|
|||
# active_aa_pos=1:1000,
|
||||
# aa_pos_lig1=1:1000,
|
||||
# aa_pos_lig2=1:1000,
|
||||
# aa_pos_lig3=1:1000
|
||||
# )
|
||||
# aa_pos_lig3=1:1000,
|
||||
# drug_colour = "red",
|
||||
# lig1_colour = "green",
|
||||
# lig2_colour = "blue",
|
||||
# lig3_colour = "skyblue"
|
||||
# )
|
|
@ -22,20 +22,22 @@ theme_set(theme_grey())
|
|||
# visually might be nicer for it to be inside the plot
|
||||
#=================================================================
|
||||
|
||||
site_snp_count_bp <- function (plotdf
|
||||
, df_colname = "position"
|
||||
site_snp_count_bp <- function (plotdf,
|
||||
df_colname = "position",
|
||||
#, bp_plot_title = ""
|
||||
#, leg_title = "Legend title"
|
||||
, leg_text_size = 10#20
|
||||
, axis_text_size = 10#25
|
||||
, axis_label_size = 10#22
|
||||
, subtitle_size = 10#20
|
||||
, geom_ls = 10
|
||||
, xaxis_title = "Number of nsSNPs"
|
||||
, yaxis_title = "Number of Sites"
|
||||
, title_colour = "chocolate4"
|
||||
, subtitle_text = NULL
|
||||
, subtitle_colour = "pink")
|
||||
leg_text_size = 10,#20
|
||||
axis_text_size = 10,#25
|
||||
axis_label_size = 10,#22
|
||||
subtitle_size = 10,#20
|
||||
geom_ls = 10,
|
||||
xaxis_title = "Number of nsSNPs",
|
||||
yaxis_title = "Number of Sites",
|
||||
title_colour = "chocolate4",
|
||||
subtitle_text = NULL,
|
||||
subtitle_colour = "pink",
|
||||
...
|
||||
)
|
||||
{
|
||||
|
||||
plotdf = as.data.frame(plotdf)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue