diff --git a/config/rpob.R b/config/rpob.R index fb2debe..4a3a76a 100644 --- a/config/rpob.R +++ b/config/rpob.R @@ -65,8 +65,8 @@ cat("\n===================================================" aa_pos_lig1 = NULL aa_pos_lig2 = NULL aa_pos_lig3 = NULL -tile_map=data.frame(tile=c("RPO","DPA","CDL","Ca"), - tile_colour=c("green","darkslategrey","navyblue","purple")) +tile_map=data.frame(tile=c("RFP"), + tile_colour=c("green")) #### diff --git a/scripts/functions/bp_lineage.R b/scripts/functions/bp_lineage.R index cc8103f..8585c82 100644 --- a/scripts/functions/bp_lineage.R +++ b/scripts/functions/bp_lineage.R @@ -29,6 +29,7 @@ lin_count_bp <- function( lf_data = lin_lf , y_log10 = FALSE , y_scale_percent = FALSE , y_label = c("Count", "SNP diversity") + , ... #, y_label = c("Count") ) { if(!all_lineages){ diff --git a/scripts/functions/bp_lineage_diversity.R b/scripts/functions/bp_lineage_diversity.R index 2a5d6a3..9fb6d66 100644 --- a/scripts/functions/bp_lineage_diversity.R +++ b/scripts/functions/bp_lineage_diversity.R @@ -36,7 +36,7 @@ lin_count_bp_diversity <- function( lf_data = lin_wf , subtitle_text = NULL , sts = 20 , subtitle_colour = "#350E20FF" #brown - ) { + , ...) { if(!all_lineages){ lf_data = lf_data[lf_data[[x_categ]]%in%use_lineages,] } diff --git a/scripts/functions/logoP_or.R b/scripts/functions/logoP_or.R index ba1e582..0caee96 100644 --- a/scripts/functions/logoP_or.R +++ b/scripts/functions/logoP_or.R @@ -79,11 +79,12 @@ LogoPlotCustomH <- function(plot_df #------------------- if (y_axis_log){ - log_colname = paste0("log_", y_axis_colname) - plot_df[log_colname] = log_value(plot_df[y_axis_colname]) + log_colname = paste0("log10_", y_axis_colname) + #plot_df[log_colname] = log_value(plot_df[y_axis_colname]) + #plot_df[[log_colname]] = log10(plot_df[y_axis_colname]) logo_df = plot_df[, c(x_axis_colname, symbol_colname, log_colname)] logo_df_plot = logo_df[, c(x_axis_colname, symbol_colname, log_colname)] - logo_df_plot = logo_df_plot %>% spread(x_axis_colname, y_axis_colname, fill = 0.0) + logo_df_plot = logo_df_plot %>% spread(x_axis_colname, log_colname, fill = 0.0) rownames(logo_df_plot) = logo_df_plot$mutant_type logo_df_plot$mutant_type = NULL logo_dfP_wf=as.matrix(logo_df_plot) @@ -151,15 +152,15 @@ LogoPlotCustomH <- function(plot_df ytt_col = "black" } - if (y_axis_log){ - - if (grepl("Log", y_lab)){ - y_lab = y_lab - - }else{ - y_lab = paste("Log", y_lab) - } - } + # if (y_axis_log){ + # + # if (grepl("Log", y_lab)){ + # y_lab = y_lab + # + # }else{ + # y_lab = paste("Log", y_lab) + # } + # } plot_grid( ggplot() + geom_logo(logo_dfP_wf