This repository provides code to run an analysis of data collected during an outbreak of SARS-CoV-2 onboard the Diamond Princess. The analysis is based off a previous analysis from [[https://doi.org/10.1093/sysbio/syac037][Andréoletti /et al/ (2022)]] and uses the [[https://aezarebski.github.io/timtam/][TimTam]] package for BEASTv2.
See the [[file:./data/readme.org]] document which describes the sequence and case data used in this analysis.
See the [[file:./model.org]] document which describes the model.
| Results figure | R script that generated it | |--------------------------+-----------------------------------------------------------------| | [[fig:data]] | [[./R/preprocessing-part-3.R]] | | [[fig:r0-estimates]] | [[./R/combine-ltt-and-histories.R]] and [[./R/postprocessing-part-4.R]] | | [[fig:prevalence-estimates]] | [[./R/combine-ltt-and-histories.R]] and [[./R/postprocessing-part-4.R]] |
[[./out/manuscript/data-plot.png]]
[[./out/manuscript/r0-estimates.png]]
[[./out/manuscript/prevalence-estimates.png]]
This assumes that you have [[https://ant.apache.org/][Apache Ant]], [[https://cran.r-project.org/][R]] and [[https://www.java.com/en/][Java]] installed.
** Getting help
The computations are coordinated with Ant. To get a list of the various targets it knows how to build run the following:
ant -p
** Setting up BEAST2
ant setuplib
Note that this will only set up the relevant BEAST tools. You will still need to install the TimTam package via BEAUti.
** Running the analysis
*** Optional: generation of XML
ant preprocess # proprocess data ant beauti # generate XML
Getting to the final XML files used is not an entirely automated process, and making it so would likely be counter productive.
*** MCMC
ant mcmc
WARNING: The XML reads sequences in from =data/diamond.fasta= which is not part of this repository. See the [[file:./data/readme.org][README]] in that directory for details.
*** Postprocessing
ant postprocess