renamed file
This commit is contained in:
parent
ee35e1cb20
commit
9fc9a5852b
5 changed files with 96 additions and 40 deletions
110
boxplot_stat_all.R
Normal file → Executable file
110
boxplot_stat_all.R
Normal file → Executable file
|
@ -3,19 +3,31 @@ getwd()
|
|||
setwd("~/git/mosaic_2020/")
|
||||
getwd()
|
||||
###############################################################
|
||||
#=============
|
||||
# Input
|
||||
#=============
|
||||
source("boxplot_stat_function.R")
|
||||
source("plot_data.R")
|
||||
|
||||
#=============
|
||||
# Output:
|
||||
# Output
|
||||
#=============
|
||||
outfile_bp = paste0("boxplots_stats_all", ".pdf")
|
||||
output_boxplot_stats = paste0(outdir_plots, outfile_bp); output_boxplot_stats
|
||||
pdf(output_boxplot_stats, width=22, height=16)
|
||||
|
||||
#===========================
|
||||
###############################################################
|
||||
#===============================
|
||||
# data assignment for plots
|
||||
#===============================
|
||||
#-------------
|
||||
# NPA
|
||||
#===========================
|
||||
#-------------
|
||||
my_sample_npa = "NPA"
|
||||
fp_npa = length(unique(lf_fp_npa$mosaic)); fp_npa
|
||||
|
||||
cat("\nPlotting boxplots with stats for:", my_sample_npa
|
||||
, "\n========================================================\n")
|
||||
|
||||
plots_npa = doMyPlots(lf_fp_npa)
|
||||
npa_plot = ggpubr::ggarrange(plotlist = plots_npa
|
||||
, align = "hv"
|
||||
|
@ -24,36 +36,64 @@ npa_plot = ggpubr::ggarrange(plotlist = plots_npa
|
|||
, common.legend = T)
|
||||
#npa_plot
|
||||
npa_plot_annot = annotate_figure(npa_plot
|
||||
, top = text_grob(my_sample_npa, color = "blue", face = "bold", size = 14)
|
||||
, bottom = text_grob("Mosaic data\nFlu positive adults (n=133)"
|
||||
, top = text_grob(my_sample_npa
|
||||
, color = "blue"
|
||||
, face = "bold"
|
||||
, size = 14)
|
||||
, bottom = text_grob(paste0("Mosaic data\nFlu positive adults (n=", fp_npa, ")")
|
||||
, color = "blue"
|
||||
, hjust = 1, x = 0.98, face = "italic", size = 10)
|
||||
, left = text_grob("Levels (pg/ml)", color = "black", rot = 90, size = 18))
|
||||
, hjust = 1
|
||||
, x = 0.98
|
||||
, face = "italic"
|
||||
, size = 10)
|
||||
, left = text_grob("Levels (pg/ml)"
|
||||
, color = "black"
|
||||
, rot = 90
|
||||
, size = 18))
|
||||
npa_plot_annot
|
||||
#dev.off()
|
||||
#===========================
|
||||
#-------------
|
||||
# SAM
|
||||
#===========================
|
||||
my_sample_sam = "SAM"
|
||||
plots_sam = doMyPlots(lf_fp_sam)
|
||||
sam_plot = ggpubr::ggarrange(plotlist = plots_sam
|
||||
, align = "hv"
|
||||
, ncol = 7
|
||||
, nrow = 5
|
||||
, common.legend = T)
|
||||
#-------------
|
||||
#my_sample_sam = "SAM"
|
||||
#fp_sam = length(unique(lf_fp_sam$mosaic)); fp_sam
|
||||
|
||||
#cat("\nPlotting boxplots with stats for:", my_sample_sam
|
||||
# , "\n========================================================\n")
|
||||
|
||||
#plots_sam = doMyPlots(lf_fp_sam)
|
||||
#sam_plot = ggpubr::ggarrange(plotlist = plots_sam
|
||||
# , align = "hv"
|
||||
# , ncol = 7
|
||||
# , nrow = 5
|
||||
# , common.legend = T)
|
||||
#sam_plot
|
||||
sam_plot_annot = annotate_figure(sam_plot
|
||||
, top = text_grob(my_sample_sam, color = "blue", face = "bold", size = 14)
|
||||
, bottom = text_grob("Mosaic data\nFlu positive adults (n=133)"
|
||||
, color = "blue"
|
||||
, hjust = 1, x = 0.98, face = "italic", size = 10)
|
||||
, left = text_grob("Levels (pg/ml)", color = "black", rot = 90, size = 18))
|
||||
sam_plot_annot
|
||||
#sam_plot_annot = annotate_figure(sam_plot
|
||||
# , top = text_grob(my_sample_sam
|
||||
# , color = "blue"
|
||||
# , face = "bold"
|
||||
# , size = 14)
|
||||
# , bottom = text_grob(paste0("Mosaic data\nFlu positive adults (n=", fp_sam, ")")
|
||||
# , color = "blue"
|
||||
# , hjust = 1
|
||||
# , x = 0.98
|
||||
# , face = "italic"
|
||||
# , size = 10)
|
||||
# , left = text_grob("Levels (pg/ml)"
|
||||
# , color = "black"
|
||||
# , rot = 90
|
||||
# , size = 18))
|
||||
#sam_plot_annot
|
||||
#dev.off()
|
||||
#===========================
|
||||
#-------------
|
||||
# SERUM
|
||||
#===========================
|
||||
#-------------
|
||||
my_sample_serum = "serum"
|
||||
fp_serum = length(unique(lf_fp_serum$mosaic)); fp_serum
|
||||
|
||||
cat("\nPlotting boxplots with stats for:", my_sample_serum
|
||||
, "\n========================================================\n")
|
||||
|
||||
plots_serum = doMyPlots(lf_fp_serum)
|
||||
serum_plot = ggpubr::ggarrange(plotlist = plots_serum
|
||||
, align = "hv"
|
||||
|
@ -62,10 +102,20 @@ serum_plot = ggpubr::ggarrange(plotlist = plots_serum
|
|||
, common.legend = T)
|
||||
#serum_plot
|
||||
serum_plot_annot = annotate_figure(serum_plot
|
||||
, top = text_grob(my_sample_serum, color = "blue", face = "bold", size = 14)
|
||||
, bottom = text_grob("Mosaic data\nFlu positive adults (n=133)"
|
||||
, top = text_grob(my_sample_serum
|
||||
, color = "blue"
|
||||
, face = "bold"
|
||||
, size = 14)
|
||||
, bottom = text_grob(paste0("Mosaic data\nFlu positive adults (n=", fp_serum, ")")
|
||||
, color = "blue"
|
||||
, hjust = 1, x = 0.98, face = "italic", size = 10)
|
||||
, left = text_grob("Levels (pg/ml)", color = "black", rot = 90, size = 18))
|
||||
, hjust = 1
|
||||
, x = 0.98
|
||||
, face = "italic"
|
||||
, size = 10)
|
||||
, left = text_grob("Levels (pg/ml)"
|
||||
, color = "black"
|
||||
, rot = 90
|
||||
, size = 18))
|
||||
serum_plot_annot
|
||||
dev.off()
|
||||
###############################################################
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue