From a4d305d44bf2a49462d1eb8c957bb992deecc0ca Mon Sep 17 00:00:00 2001 From: Tanushree Tunstall Date: Mon, 2 Nov 2020 16:36:52 +0000 Subject: [PATCH] added TASK at the beginning of the scripts --- boxplot_stat_all.R | 10 ++++++++++ boxplot_stat_function.R | 17 ++++++++++++++++- boxplot_stat_log.R | 12 +++++++++++- 3 files changed, 37 insertions(+), 2 deletions(-) diff --git a/boxplot_stat_all.R b/boxplot_stat_all.R index 74cf819..ac29943 100755 --- a/boxplot_stat_all.R +++ b/boxplot_stat_all.R @@ -3,6 +3,16 @@ getwd() setwd("~/git/mosaic_2020/") getwd() ############################################################### +# TASK: boxplots with stats for NPA, SAM and SERUM +# for each mediator, at each timepoint by group + +# TODO: check boxplot_stat_function.R +# output plots even if stats fail due to data containing only LLODs +# however for a given mediator, if there is error for ANY timepoint +# stats will not be added for the entire plot! To be handled in +# next iteration! +############################################################### + #============= # Input #============= diff --git a/boxplot_stat_function.R b/boxplot_stat_function.R index 0e02f3b..2ad5a07 100755 --- a/boxplot_stat_function.R +++ b/boxplot_stat_function.R @@ -3,7 +3,22 @@ getwd() setwd("~/git/mosaic_2020/") getwd() ############################################################ -# TASK: boxplots with stats +# TASK: Boxplots with stats +# for each mediator, at each timepoint by group + +# Handles some error: i.e will continue plotting even if there +# is stats error. However, needs fixing see below point 1): + +# FIXME: +# 1) For a given mediator, if there is error for ANY timepoint +# stats will not be added for the entire plot! + +# 2) make the function more generic to take the following inputs +# df, column, group +# this way you can directly pass the log_calculated value column + +# To be handled in +# next iteration! ############################################################ is.error <- function(x) inherits(x, "try-error") diff --git a/boxplot_stat_log.R b/boxplot_stat_log.R index 8a73597..e126a00 100755 --- a/boxplot_stat_log.R +++ b/boxplot_stat_log.R @@ -3,11 +3,21 @@ getwd() setwd("~/git/mosaic_2020/") getwd() ############################################################### +# TASK: boxplots with stats for NPA, SAM and SERUM but with log scale +# for each mediator, at each timepoint, by group + +# TODO: check boxplot_stat_function.R +# output plots even if stats fail due to data containing only LLODs +# however for a given mediator, if there is error for ANY timepoint +# stats will not be added for the entire plot! To be handled in +# next iteration! +############################################################### + #============= # Input #============= source("boxplot_stat_function.R") -source("boxplot_function.R") +#source("boxplot_function.R") for sam source("plot_data.R") #=============