Skip to content

janmedlock/FMDV

Repository files navigation

FMDV

A transmission model of foot-and-model-disease viruses in African buffalo

Jan Medlock <jan.medlock@oregonstate.edu>, Erin Gorisch, Anna Jolles, Simon Gubbins, Brianna Beechler, Peter Buss, Nick Juleff, Lin-Mari de Klerk-Lorist, Francois Maree, Eva Perez-Martin, OL van Schalkwyk, Katherine Scott, Fuquan Zhang, Bryan Charleston.

Copyright 2014–2020, Jan Medlock et al. All rights reserved. Released under the GNU AGPL 3.

This repository contains Python code and data used to simulate and analyze FMDV transmission in African buffalo for our paper

Jolles A, Gorsich E, Gubbins S, Beechler B, Buss P, Juleff N, deKlerk-Lorist L-M, Maree F, Perez-Martin E, van Schalkwyk OL, Scott K, Zhang F, Medlock J, Charleston B. Endemic dynamics of foot-and-mouth disease viruses in their reservoir, African buffalo. In preparation.

The scripts and model code are written in Python3, using many third-party libraries. Most notably: Python3, NumPy & SciPy, statsmodels, pandas, PyTables, Sorted Containers, matplotlib, & Seaborn.

Main simulation code

The module that simulates the FMDV model is in the Python module herd.

The submodule herd.floquet contains the solver to find the population stable age distribution with birth seasonality. In the folder herd/floquet is an optional faster implementation in Cython of herd.floquet.monodromy that can be built using the included Makefile.

The folder herd/data contains the parameter posterior samples from the statistical analysis of our experimental data and a summary of the data from Hedger (1972) used to initialize our simulations.

Simulation scripts

These scripts run the model simulations. Each of these takes many cpu-days to run.

  • run.py, for each of the acute and chronic models and for each of the 3 SATs, runs 1,000 simulations using the baseline parameter values. It produces a file called run.h5.

  • samples_run.py, for each of the acute and chronic models, for each of the 3 SATs, and for each of 20,000 parameter posterior samples, runs 1 simulation. It produces a file called samples.h5.

  • birth_seasonality_run.py, for each of the acute and chronic models, for each of the 3 SATs, and for 5 different levels of birth seasonality, runs 1,000 simulations using the baseline parameter values. It produces a file called birth_seasonality.h5.

  • population_size_run.py, for each of the acute and chronic models, for each of the 3 SATs, and for 14 different population sizes, runs 1,000 simulations using the baseline parameter values. It produces a file called population_size.h5.

  • start_time_run.py, for each of the acute and chronic models, for each of the 3 SATs, and for 12 different times of year to start the simulations, runs 1,000 simulations using the baseline parameter values. It produces a file called start_time.h5.

Analysis and plotting scripts

These scripts analyze and plot the simulation results. Most of them require having run the simulation scripts above.

  • R0.py computes the basic reproduction number, R0, for each of the acute and chronic models and each of the 3 SATs.

  • susceptible_recruitment.py plots the inflow of susceptibles vs. time of year that occurs in our model due to the seasonality of births and subsequent waning of maternal immunity.

  • samples.py analyzes and plots the results of the simulations over the parameter posterior samples. This requires the file samples.h5, which is built by samples_run.py.

  • birth_seasonality.py analyzes and plots the results of varying the level of birth seasonality. This requires the file birth_seasonality.h5, which is built by birth_seasonality_run.py.

  • population_size.py analyzes and plots the results of varying the population size. This requires the file population_size.h5, which is built by population_size_run.py.

  • start_time.py analyzes and plots the results of varying the time of year to start the simluations. This requires the file start_time.h5, which is built by start_time_run.py.

  • figure_3.py builds Figure 3 from our paper. This requires the file run.h5, which is built by run.py.

  • figure_4.py builds Figure 4 from our paper. The requires the files population_size.h5, which is built by population_size_run.py, and samples.h5, which is built by samples_run.py.

Test scripts

The test directory contains some scripts to test various parts of the model code.

Supplementary material

supplement contains files and scripts for building the modeling section of the supplementary material from our paper.