From c2d6eb49eae77b6fca054d04661c3ba8318ce354 Mon Sep 17 00:00:00 2001 From: Tanushree Tunstall Date: Tue, 21 Feb 2023 21:01:00 +0000 Subject: [PATCH] figure fixup --- scripts/plotting/plotting_thesis/thesis-figs-alr.R | 12 +++++++----- scripts/plotting/plotting_thesis/thesis-figs-embb.R | 9 +++++---- scripts/plotting/plotting_thesis/thesis-figs-gid.R | 11 ++++++----- scripts/plotting/plotting_thesis/thesis-figs-katg.R | 11 ++++++----- scripts/plotting/plotting_thesis/thesis-figs-pnca.R | 9 +++++---- scripts/plotting/plotting_thesis/thesis-figs-rpob.R | 11 ++++++----- 6 files changed, 35 insertions(+), 28 deletions(-) diff --git a/scripts/plotting/plotting_thesis/thesis-figs-alr.R b/scripts/plotting/plotting_thesis/thesis-figs-alr.R index b85c8dd..524f3e0 100644 --- a/scripts/plotting/plotting_thesis/thesis-figs-alr.R +++ b/scripts/plotting/plotting_thesis/thesis-figs-alr.R @@ -9,7 +9,9 @@ source("~/git/LSHTM_analysis/config/alr.R") source("~/git/LSHTM_analysis/scripts/plotting/get_plotting_dfs.R") -outdir="/home/pub/Work/LSHTM/Thesis_Plots/" +#outdir="/home/pub/Work/LSHTM/Thesis_Plots/" +outdir="~/git/Writing/thesis/tex/images-corrected/alr/" + # add "pos_count" position count column merged_df3=merged_df3 %>% dplyr::add_count(position) @@ -341,7 +343,7 @@ stability_low_reorder = bp_stability_hmap( ) -png(paste0(outdir,"alr_average_stability-sorted.png"), height = 6, width=11.5, unit="in",res=300) +jpeg(paste0(outdir,"alr_average_stability-sorted.jpeg"), height = 6, width=11.5, unit="in",res=300) cowplot::plot_grid( cowplot::plot_grid(heat_bar_legend, tile_legend, snp_tile_legend, nrow=1), cowplot::plot_grid(stability_high_reorder, stability_centre_reorder, stability_low_reorder,ncol=1), @@ -350,7 +352,7 @@ cowplot::plot_grid( ) dev.off() -png(paste0(outdir,"alr_average_stability-unsorted.png"), height = 6, width=11.5, unit="in",res=300) +jpeg(paste0(outdir,"alr_average_stability-unsorted.jpeg"), height = 6, width=11.5, unit="in",res=300) cowplot::plot_grid( cowplot::plot_grid(heat_bar_legend, tile_legend, snp_tile_legend, nrow=1), cowplot::plot_grid(stability_high, stability_centre, stability_low,ncol=1), @@ -359,7 +361,7 @@ cowplot::plot_grid( ) dev.off() -png(paste0(outdir,"alr_snp.png"), height = 6, width=11.5, unit="in",res=300) +jpeg(paste0(outdir,"alr_snp.jpeg"), height = 6, width=11.5, unit="in",res=300) cowplot::plot_grid( cowplot::plot_grid(heat_bar_legend, tile_legend, logoplot_chemistry_legend, nrow=1), cowplot::plot_grid(logo_p_snps_low, logo_p_snps_centre, logo_p_snps_high, ncol=1, align='hv'), @@ -368,7 +370,7 @@ cowplot::plot_grid( ) dev.off() -png(paste0(outdir,"alr_or.png"), height = 6, width=11.5, unit="in",res=300) +jpeg(paste0(outdir,"alr_or.jpeg"), height = 6, width=11.5, unit="in",res=300) cowplot::plot_grid( cowplot::plot_grid(heat_bar_legend, tile_legend, logoplot_chemistry_legend, nrow=1), cowplot::plot_grid(logo_or_low, logo_or_centre, logo_or_high, ncol=1, align='hv'), diff --git a/scripts/plotting/plotting_thesis/thesis-figs-embb.R b/scripts/plotting/plotting_thesis/thesis-figs-embb.R index 8d6c9c7..9549d66 100644 --- a/scripts/plotting/plotting_thesis/thesis-figs-embb.R +++ b/scripts/plotting/plotting_thesis/thesis-figs-embb.R @@ -9,7 +9,8 @@ source("~/git/LSHTM_analysis/config/embb.R") source("~/git/LSHTM_analysis/scripts/plotting/get_plotting_dfs.R") -outdir="/home/pub/Work/LSHTM/Thesis_Plots/" +#outdir="/home/pub/Work/LSHTM/Thesis_Plots/" +outdir="~/git/Writing/thesis/tex/images-corrected/embb/" # add "pos_count" position count column merged_df3=merged_df3 %>% dplyr::add_count(position) @@ -238,7 +239,7 @@ logo_or_high = LogoPlotCustomH(small_df3, aa_pos_lig3=aa_pos_lig3 ) -png(paste0(outdir,"embb_average_stability.png"), height = 8.25, width=11.5, unit="in",res=300) +jpeg(paste0(outdir,"embb_average_stability.jpeg"), height = 8.25, width=11.5, unit="in",res=300) cowplot::plot_grid( cowplot::plot_grid(heat_bar_legend, tile_legend, snp_tile_legend, nrow=1), cowplot::plot_grid(stability_high, stability_centre, stability_low,ncol=1), @@ -247,7 +248,7 @@ cowplot::plot_grid( ) dev.off() -png(paste0(outdir,"embb_snp.png"), height = 8.25, width=11.5, unit="in",res=300) +jpeg(paste0(outdir,"embb_snp.jpeg"), height = 8.25, width=11.5, unit="in",res=300) cowplot::plot_grid( cowplot::plot_grid(heat_bar_legend, tile_legend, logoplot_chemistry_legend, nrow=1), cowplot::plot_grid(logo_p_snps_low, logo_p_snps_centre, logo_p_snps_high, ncol=1, align='hv'), @@ -256,7 +257,7 @@ cowplot::plot_grid( ) dev.off() -png(paste0(outdir,"embb_or.png"), height = 8.25, width=11.5, unit="in",res=300) +jpeg(paste0(outdir,"embb_or.jpeg"), height = 8.25, width=11.5, unit="in",res=300) cowplot::plot_grid( cowplot::plot_grid(heat_bar_legend, tile_legend, logoplot_chemistry_legend, nrow=1), cowplot::plot_grid(logo_or_low, logo_or_centre, logo_or_high, ncol=1, align='hv'), diff --git a/scripts/plotting/plotting_thesis/thesis-figs-gid.R b/scripts/plotting/plotting_thesis/thesis-figs-gid.R index 1a781fb..0ed6751 100644 --- a/scripts/plotting/plotting_thesis/thesis-figs-gid.R +++ b/scripts/plotting/plotting_thesis/thesis-figs-gid.R @@ -9,7 +9,8 @@ source("~/git/LSHTM_analysis/config/gid.R") source("~/git/LSHTM_analysis/scripts/plotting/get_plotting_dfs.R") -outdir="/home/pub/Work/LSHTM/Thesis_Plots/" +#outdir="/home/pub/Work/LSHTM/Thesis_Plots/" +outdir="~/git/Writing/thesis/tex/images-corrected/gid/" # add "pos_count" position count column merged_df3=merged_df3 %>% dplyr::add_count(position) @@ -341,7 +342,7 @@ stability_low_reorder = bp_stability_hmap( ) -png(paste0(outdir,"gid_average_stability-sorted.png"), height = 6, width=11.5, unit="in",res=300) +jpeg(paste0(outdir,"gid_average_stability-sorted.jpeg"), height = 6, width=11.5, unit="in",res=300) cowplot::plot_grid( cowplot::plot_grid(heat_bar_legend, tile_legend, snp_tile_legend, nrow=1), cowplot::plot_grid(stability_high_reorder, stability_centre_reorder,stability_low_reorder, ncol=1), @@ -350,7 +351,7 @@ cowplot::plot_grid( ) dev.off() -png(paste0(outdir,"gid_average_stability-unsorted.png"), height = 6, width=11.5, unit="in",res=300) +jpeg(paste0(outdir,"gid_average_stability-unsorted.jpeg"), height = 6, width=11.5, unit="in",res=300) cowplot::plot_grid( cowplot::plot_grid(heat_bar_legend, tile_legend, snp_tile_legend, nrow=1), cowplot::plot_grid(stability_low, stability_centre, stability_high, ncol=1), @@ -359,7 +360,7 @@ cowplot::plot_grid( ) dev.off() -png(paste0(outdir,"gid_snp.png"), height = 6, width=11.5, unit="in",res=300) +jpeg(paste0(outdir,"gid_snp.jpeg"), height = 6, width=11.5, unit="in",res=300) cowplot::plot_grid( cowplot::plot_grid(heat_bar_legend, tile_legend, logoplot_chemistry_legend, nrow=1), cowplot::plot_grid(logo_p_snps_low, logo_p_snps_centre, logo_p_snps_high, ncol=1, align='hv'), @@ -368,7 +369,7 @@ cowplot::plot_grid( ) dev.off() -png(paste0(outdir,"gid_or.png"), height = 6, width=11.5, unit="in",res=300) +jpeg(paste0(outdir,"gid_or.jpeg"), height = 6, width=11.5, unit="in",res=300) cowplot::plot_grid( cowplot::plot_grid(heat_bar_legend, tile_legend, logoplot_chemistry_legend, nrow=1), cowplot::plot_grid(logo_or_low, logo_or_centre, logo_or_high, ncol=1, align='hv'), diff --git a/scripts/plotting/plotting_thesis/thesis-figs-katg.R b/scripts/plotting/plotting_thesis/thesis-figs-katg.R index 1525f04..2281b96 100644 --- a/scripts/plotting/plotting_thesis/thesis-figs-katg.R +++ b/scripts/plotting/plotting_thesis/thesis-figs-katg.R @@ -9,7 +9,8 @@ source("~/git/LSHTM_analysis/config/katg.R") source("~/git/LSHTM_analysis/scripts/plotting/get_plotting_dfs.R") -outdir="/home/pub/Work/LSHTM/Thesis_Plots/" +# outdir="/home/pub/Work/LSHTM/Thesis_Plots/" +outdir="~/git/Writing/thesis/tex/images-corrected/katg/" # add "pos_count" position count column merged_df3=merged_df3 %>% dplyr::add_count(position) @@ -346,7 +347,7 @@ stability_low_reorder = bp_stability_hmap( ) -png(paste0(outdir,"katg_average_stability-sorted.png"), height = 6, width=11.5, unit="in",res=300) +jpeg(paste0(outdir,"katg_average_stability-sorted.jpeg"), height = 6, width=11.5, unit="in",res=300) cowplot::plot_grid( cowplot::plot_grid(heat_bar_legend, tile_legend, snp_tile_legend, nrow=1), cowplot::plot_grid(stability_high_reorder, stability_centre_reorder, stability_low_reorder,ncol=1), @@ -355,7 +356,7 @@ cowplot::plot_grid( ) dev.off() -png(paste0(outdir,"katg_average_stability-unsorted.png"), height = 6, width=11.5, unit="in",res=300) +jpeg(paste0(outdir,"katg_average_stability-unsorted.jpeg"), height = 6, width=11.5, unit="in",res=300) cowplot::plot_grid( cowplot::plot_grid(heat_bar_legend, tile_legend, snp_tile_legend, nrow=1), cowplot::plot_grid(stability_high, stability_centre, stability_low,ncol=1), @@ -364,7 +365,7 @@ cowplot::plot_grid( ) dev.off() -png(paste0(outdir,"katg_snp.png"), height = 6, width=11.5, unit="in",res=300) +jpeg(paste0(outdir,"katg_snp.jpeg"), height = 6, width=11.5, unit="in",res=300) cowplot::plot_grid( cowplot::plot_grid(heat_bar_legend, tile_legend, logoplot_chemistry_legend, nrow=1), cowplot::plot_grid(logo_p_snps_low, logo_p_snps_centre, logo_p_snps_high, ncol=1, align='hv'), @@ -373,7 +374,7 @@ cowplot::plot_grid( ) dev.off() -png(paste0(outdir,"katg_or.png"), height = 6, width=11.5, unit="in",res=300) +jpeg(paste0(outdir,"katg_or.jpeg"), height = 6, width=11.5, unit="in",res=300) cowplot::plot_grid( cowplot::plot_grid(heat_bar_legend, tile_legend, logoplot_chemistry_legend, nrow=1), cowplot::plot_grid(logo_or_low, logo_or_centre, logo_or_high, ncol=1, align='hv'), diff --git a/scripts/plotting/plotting_thesis/thesis-figs-pnca.R b/scripts/plotting/plotting_thesis/thesis-figs-pnca.R index 5055785..130a180 100644 --- a/scripts/plotting/plotting_thesis/thesis-figs-pnca.R +++ b/scripts/plotting/plotting_thesis/thesis-figs-pnca.R @@ -9,7 +9,8 @@ source("~/git/LSHTM_analysis/config/pnca.R") source("~/git/LSHTM_analysis/scripts/plotting/get_plotting_dfs.R") -outdir="/home/pub/Work/LSHTM/Thesis_Plots/" +#outdir="/home/pub/Work/LSHTM/Thesis_Plots/" +outdir="~/git/Writing/thesis/tex/images-corrected/pnca/" # add "pos_count" position count column merged_df3=merged_df3 %>% dplyr::add_count(position) @@ -243,7 +244,7 @@ logo_or_high = LogoPlotCustomH(small_df3, rm_empty_y=T ) -png(paste0(outdir,"pnca_average_stability.png"), height = 8.25, width=11.5, unit="in",res=300) +jpeg(paste0(outdir,"pnca_average_stability.jpeg"), height = 8.25, width=11.5, unit="in",res=300) cowplot::plot_grid( cowplot::plot_grid(heat_bar_legend, tile_legend, snp_tile_legend, nrow=1), cowplot::plot_grid(stability_high, stability_centre, stability_low,ncol=1), @@ -252,7 +253,7 @@ cowplot::plot_grid( ) dev.off() -png(paste0(outdir,"pnca_snp.png"), height = 8.25, width=11.5, unit="in",res=300) +jpeg(paste0(outdir,"pnca_snp.jpeg"), height = 8.25, width=11.5, unit="in",res=300) cowplot::plot_grid( cowplot::plot_grid(heat_bar_legend, tile_legend, logoplot_chemistry_legend, nrow=1), cowplot::plot_grid(logo_p_snps_low, logo_p_snps_centre, logo_p_snps_high, ncol=1, align='hv'), @@ -261,7 +262,7 @@ cowplot::plot_grid( ) dev.off() -png(paste0(outdir,"pnca_or.png"), height = 8.25, width=11.5, unit="in",res=300) +jpeg(paste0(outdir,"pnca_or.jpeg"), height = 8.25, width=11.5, unit="in",res=300) cowplot::plot_grid( cowplot::plot_grid(heat_bar_legend, tile_legend, logoplot_chemistry_legend, nrow=1), cowplot::plot_grid(logo_or_low, logo_or_centre, logo_or_high, ncol=1, align='hv'), diff --git a/scripts/plotting/plotting_thesis/thesis-figs-rpob.R b/scripts/plotting/plotting_thesis/thesis-figs-rpob.R index 36202ea..e15c97f 100644 --- a/scripts/plotting/plotting_thesis/thesis-figs-rpob.R +++ b/scripts/plotting/plotting_thesis/thesis-figs-rpob.R @@ -9,7 +9,8 @@ source("~/git/LSHTM_analysis/config/rpob.R") source("~/git/LSHTM_analysis/scripts/plotting/get_plotting_dfs.R") -outdir="/home/pub/Work/LSHTM/Thesis_Plots/" +#outdir="/home/pub/Work/LSHTM/Thesis_Plots/" +outdir="~/git/Writing/thesis/tex/images-corrected/rpob/" # add "pos_count" position count column merged_df3=merged_df3 %>% dplyr::add_count(position) @@ -349,7 +350,7 @@ stability_low_reorder = bp_stability_hmap( ) -png(paste0(outdir,"rpob_average_stability-sorted.png"), height = 6, width=11.5, unit="in",res=300) +jpeg(paste0(outdir,"rpob_average_stability-sorted.jpeg"), height = 6, width=11.5, unit="in",res=300) cowplot::plot_grid( cowplot::plot_grid(heat_bar_legend, tile_legend, snp_tile_legend, nrow=1), cowplot::plot_grid(stability_high_reorder, stability_centre_reorder, stability_low_reorder,ncol=1), @@ -358,7 +359,7 @@ cowplot::plot_grid( ) dev.off() -png(paste0(outdir,"rpob_average_stability-unsorted.png"), height = 6, width=11.5, unit="in",res=300) +jpeg(paste0(outdir,"rpob_average_stability-unsorted.jpeg"), height = 6, width=11.5, unit="in",res=300) cowplot::plot_grid( cowplot::plot_grid(heat_bar_legend, tile_legend, snp_tile_legend, nrow=1), cowplot::plot_grid(stability_high, stability_centre, stability_low,ncol=1), @@ -367,7 +368,7 @@ cowplot::plot_grid( ) dev.off() -png(paste0(outdir,"rpob_snp.png"), height = 6, width=11.5, unit="in",res=300) +jpeg(paste0(outdir,"rpob_snp.jpeg"), height = 6, width=11.5, unit="in",res=300) cowplot::plot_grid( cowplot::plot_grid(heat_bar_legend, tile_legend, logoplot_chemistry_legend, nrow=1), cowplot::plot_grid(logo_p_snps_low, logo_p_snps_centre, logo_p_snps_high, ncol=1, align='hv'), @@ -376,7 +377,7 @@ cowplot::plot_grid( ) dev.off() -png(paste0(outdir,"rpob_or.png"), height = 6, width=11.5, unit="in",res=300) +jpeg(paste0(outdir,"rpob_or.jpeg"), height = 6, width=11.5, unit="in",res=300) cowplot::plot_grid( cowplot::plot_grid(heat_bar_legend, tile_legend, logoplot_chemistry_legend, nrow=1), cowplot::plot_grid(logo_or_low, logo_or_centre, logo_or_high, ncol=1, align='hv'),