Skip to content

covid19br/VaxModel-paper

Repository files navigation

README VaxModel

This repository contains the source code for the paper entitled "Assessing optimal time between doses in two-dose vaccination regimen in an ongoing epidemic of SARS-CoV-2" by Ferreira et al.

The code is most built in R language (version >= 4.0) with some Bash scripts to run several simulations. The code was tested in Ubuntu 20.04.2 LTS.

1. Files Structure

  • On SEIR_run.R you find the definition of the differential equations and the numerical integrator.
  • On functions/ you find most supporting functions/scripts of the model, specially:
    • params_epi.R that loads epidemiologic parameters of the model,
    • params_vaccine.R that loads vaccine-related parameters and
    • opt_vax_rate.R that contains the solver for the linear optimization model.
  • DATA/ contains most epidemiologic parameters, including the initial condition.
  • results/ contains the brute data generated by the model, separated by vaccine.
  • plots/ contains the figures generated to the paper and some others

2. Basic Run

To generate a basic plot of the model with smaller time scale, given that any dependencies are installed, run:

source("basic_run.R")

and plot with

plot.simulation(SOLUTION)

or, more interestingly, showing only vaccinated individuals:

plot.simulation(SOLUTION, c("Sv","Sw","Rv","Rw"))

and deaths:

plot.simulation(SOLUTION, c("Du","Dv","Dw"))

The user can change the basic_run.R file to a bigger time-scale, but this might take a while (>20 min), and also other parameters from params_epi.R and params_vaccine.R by updating the func_factory function present in SEIR_run.R, as shown in basic_run.R.

3. Running the Results

This is not recommended to run in a single computer since this might take several days to run. The algorithm is prepared to run in a very specific SLURM/Unix environment and might not be compatible with every computer. We provide the raw data in the results/ folder and the analysis can be done with the scripts shown in the next section.

1. Do:

In the terminal

chmod +x for_loop_sensibility.sh
chmod +x for_reff.sh

This will make these Bash scripts executable. They will loop over several parameter values.

2. Then:

./for_loop_sensibility.sh &
./for_reff.sh &

Will run all the combinations of parameters studied in this paper for a VERY SPECIFIC cluster. This should be avoided.

4. Running the Analysis

In Rstudio:

source("analysis_script.R")
source("analysis_script_grid.R")

running this should generate the plots used in this paper.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published