This analysis compiles the output from the second analysis.
There are only two steps here:
- Compile the data into a single
data.table
and write to file - Run statistical analyses and create plots
Step (1) loops through the output from the second analysis.
Because this is a serial loop, it can take a while to complete.
To avoid timeouts, step (1) can be run in the background.
screen
accomplishes this neatly. So does nohup
:
nohup Rscript compile_all_results.R \
--results-directory ${output_data_dir} \
--output-directory ${resultsdir} \
--output-filename ${results_file} \
> nohup.compile.results.out 2> nohup.compile.results.err &
Step (2) saves plots directly to file, but outputs results from statistical analysis to the console. As in the example above, the results can be redirected and saved to file:
Rscript plot_results.R \
--results-file ${results_filepath} \
--output-directory ${plotdir} \
--plot-filetype ${plot_filetype} \
> plot.results.out 2> plot.results.err
From a Bourne shell, call the script directly:
./compile_results.sh
- Dinno A. (2017)
dunn.test
: Dunn's Test of Multiple Comparisons Using Rank Sums. R package version 1.3.5. (link) - Wickham H. (2016)
ggplot2
: Elegant Graphics for Data Analysis. Springer-Verlag New York.