saving work

This commit is contained in:
Tanushree Tunstall 2020-11-20 13:14:10 +00:00
parent 0d591c46f5
commit 3b6776af24
2 changed files with 16 additions and 16 deletions

View file

@ -17,12 +17,12 @@ getwd()
# Input
#=============
source("boxplot_stat_function.R")
source("plot_data.R")
source("plot_data_na.R")
#=============
# Output
#=============
outfile_bp = paste0("boxplots_stats_all-%03d.svg")
outfile_bp = paste0("boxplots_stats_all_NA-%03d.svg")
output_boxplot_stats = paste0(outdir_plots, outfile_bp); output_boxplot_stats
svg(output_boxplot_stats, width=22, height=16)
###############################################################
@ -32,7 +32,7 @@ svg(output_boxplot_stats, width=22, height=16)
#-------------
# NPA
#-------------
title_npa = "NPA"
title_npa = "NPA (non-asthmatics)"
fp_npa = length(unique(lf_fp_npa$mosaic)); fp_npa
cat("\nPlotting boxplots with stats for:", title_npa
@ -50,7 +50,7 @@ npa_plot_annot = annotate_figure(npa_plot
, color = "blue"
, face = "bold"
, size = 18)
, bottom = text_grob(paste0("Mosaic data\nFlu positive adults (n=", fp_npa, ")")
, bottom = text_grob(paste0("Mosaic data\nFP non-asthmatic adults (n=", fp_npa, ")")
, color = "blue"
, hjust = 1
, x = 0.98
@ -67,7 +67,7 @@ npa_plot_annot
# FIXME: error handling!
# For now, just calling plotting function without stats
#-------------
title_sam = "SAM"
title_sam = "SAM (non-asthmatics)"
fp_sam = length(unique(lf_fp_sam$mosaic)); fp_sam
cat("\nPlotting boxplots with stats for:", title_sam
@ -86,7 +86,7 @@ sam_plot_annot = annotate_figure(sam_plot
, color = "blue"
, face = "bold"
, size = 18)
, bottom = text_grob(paste0("Mosaic data\nFlu positive adults (n=", fp_sam, ")")
, bottom = text_grob(paste0("Mosaic data\nFP non-asthmatic adults (n=", fp_sam, ")")
, color = "blue"
, hjust = 1
, x = 0.98
@ -101,7 +101,7 @@ sam_plot_annot
#-------------
# SERUM
#-------------
title_serum = "SERUM"
title_serum = "SERUM (non-asthmatics)"
fp_serum = length(unique(lf_fp_serum$mosaic)); fp_serum
cat("\nPlotting boxplots with stats for:", title_serum
@ -119,7 +119,7 @@ serum_plot_annot = annotate_figure(serum_plot
, color = "blue"
, face = "bold"
, size = 18)
, bottom = text_grob(paste0("Mosaic data\nFlu positive adults (n=", fp_serum, ")")
, bottom = text_grob(paste0("Mosaic data\nFP non-asthmatic adults (n=", fp_serum, ")")
, color = "blue"
, hjust = 1
, x = 0.98