From f7b55d035a60c1c917b108c6006b351deba00376 Mon Sep 17 00:00:00 2001 From: Tanushree Tunstall Date: Wed, 9 Sep 2020 13:18:57 +0100 Subject: [PATCH] lineage dist plots combined generated Please enter the commit message for your changes. Lines starting --- scripts/plotting/lineage_dist_PS.R | 19 ++++++++++--------- scripts/plotting/running_plot_scripts | 17 +++++++++++++++++ 2 files changed, 27 insertions(+), 9 deletions(-) diff --git a/scripts/plotting/lineage_dist_PS.R b/scripts/plotting/lineage_dist_PS.R index 1c46f57..d62b038 100644 --- a/scripts/plotting/lineage_dist_PS.R +++ b/scripts/plotting/lineage_dist_PS.R @@ -1,8 +1,4 @@ -#!/usr/bin/env Rscript -getwd() -setwd("~/git/LSHTM_analysis/scripts/plotting/") -getwd() - +#!/usr/bin/env Rscript ######################################################### # TASK: Lineage dist plots: ggridges @@ -14,7 +10,12 @@ getwd() ########################################################## # Installing and loading required packages ########################################################## +getwd() +setwd("~/git/LSHTM_analysis/scripts/plotting/") +getwd() +source("Header_TT.R") +library(ggridges) source("combining_dfs_plotting.R") # PS combined: # 1) merged_df2 @@ -273,9 +274,9 @@ p2 = ggplot(df_dr, aes(x = duet_scaled , axis.ticks.y = element_blank() , plot.title = element_blank() , strip.text = element_text(size = my_als) - #, legend.text = element_text(size = 10) - #, legend.title = element_text(size = my_als) - , legend.position = "none" + , legend.text = element_text(size = 10) + , legend.title = element_text(size = my_als) + #, legend.position = "none" ) print(p2) @@ -288,7 +289,7 @@ print(p2) lineage_dist_combined = "lineage_dist_combined_PS.svg" plot_lineage_dist_combined = paste0(plotdir,"/", lineage_dist_combined) -svg(plot_lineage_dist_combined, width = 16, height = 12) +svg(plot_lineage_dist_combined, width = 12, height = 6) printFile = cowplot::plot_grid(p1, p2 , label_size = my_als+10) diff --git a/scripts/plotting/running_plot_scripts b/scripts/plotting/running_plot_scripts index 365fcb5..6749fa1 100644 --- a/scripts/plotting/running_plot_scripts +++ b/scripts/plotting/running_plot_scripts @@ -3,6 +3,9 @@ #======== FIXME: +#======================= +dirs.R +#======================= #dirs.R: imports dir structure change this to cmd so you can pass in drug and gene name @@ -11,6 +14,13 @@ plotting_data.R #======================= ??? update how to run + +#======================= +combining_dfs_plotting.R +#======================= +??? update how to run + + #======================= mcsm_mean_stability.R #======================= @@ -62,6 +72,13 @@ barplots_subcolours_PS.R # output plots: 1 svg 1) barplot_coloured_PS.svg +#======================= +lineage_dist_PS.R +# lineage distribution for all muts and dr muts in one figure +#======================= +# input: calls the "combining_dfs_plotting.R" +# output plots: 1 svg + 1) lineage_dist_combined_PS.svg ########################################################################