seirmo
This is a project to model the outbreak of an infectious disease with the SEIR model.
Science Score: 67.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 5 DOI reference(s) in README -
✓Academic publication links
Links to: arxiv.org, springer.com, zenodo.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (11.5%) to scientific vocabulary
Repository
This is a project to model the outbreak of an infectious disease with the SEIR model.
Basic Info
Statistics
- Stars: 2
- Watchers: 1
- Forks: 2
- Open Issues: 7
- Releases: 1
Metadata Files
README.md
General Information
This program models the outbreak of an infectious disease with the SEIR model. The SEIR model is a compartmental model with four compartments: susceptible (S), exposed (but not yet infectious) (E), infectious (I), and recovered (R). Each individual is in one compartment at a time, and different rates quantify the movement of an individual from one compartment to another.
Two submodels are defined in the program: a deterministic SEIR model and a stochastic SEIR model. Both are non-spatial and are time dependant. When the population size is small, the emergent behaviour of the two systems (deterministic and stochastic) can significantly differ. When the population size is larger, the dynamics tend to better align.
Deterministic SEIR
The deterministic model supposes that the population is large and well-mixed, and that small fluctuations in compartments do not impact the general solution. The conceptualisation of the model is illustrated below, and the parameters are described in a table below.

| Parameter | Description | Unit | | ------------- | --------------------------------------------------------------------------------------- | ---- | | β | Percentage of infectious and susceptible encounters per day that lead to transmission | 1/t | | κ | Inverse of the average latent period | 1/t | | γ | Inverse of the average duration of infectiousness | 1/t |
β > 0 controls the rate of tranmission, κ > 0 the rate at which exposed individuals become infectious, and γ > 0 the rate at which individuals recover. The model also requires initial conditions for each compartment: S(0), E(0), I(0), and R(0), which represent the initial number of people in each category.
The deterministic model solves this set of ODEs:
$$ \frac{dS(t)}{dt} = - \beta S(t) I(t), \\ \frac{dE(t)}{dt} = \beta S(t) I(t) - \kappa E(t), \\ \frac{dI(t)}{dt} = \kappa E(t) - \gamma I(t), \\ \frac{dR(t)}{dt} = \gamma I(t) $$
The system of ODEs is nonlinear and must be solved by numerical integration methods. It is solved here using a forward model, using the solve_ivp method in the scipy.integrate library.
Stochastic SEIR
The stochastic model also supposes that the population is homogeneous, but it supposes that small fluctuations in compartments count toward the general solution. It models the population discretely and allows stochastic movements between compartments. The model can be illustrated as a set of chemical reactions:

The model is solved using the Gillespie algorithm (see documentation here). The timesteps are sampled randomly. At each timestep, only one reaction takes place, and which reaction takes place is determined randomly following their propensities. For example, for a given time t, if the reaction occuring is a susceptible individual becoming exposed, then the following changes occur in the densities:
$$ S(t + 1)=S(t) - 1, \\ E(t + 1)=E(t) + 1 $$
where (t+1) is the next timestep.
Installation procedure
One way to install the module is to download the repositiory to your machine of choice and type the following commands in the terminal.
bash
git clone https://github.com/SABS-R3-Epidemiology/seirmo.git
cd ../path/to/the/file
A different method to install this is using pip:
bash
pip install -e .
Documentation
Some documentation on the program's classes and methods can be found here: https://seirmo.readthedocs.io/en/latest/
References
List of ressources that can be useful for the project:
- Gillespie D, 1977. Exact stochastic simulation of coupled chemical reactions (https://doi.org/10.1021/j100540a008)
- Erban R, Chapman J and Maini P, 2007. A practical guide to stochastic simulations of reaction-diffusion processes (https://arxiv.org/abs/0704.1908)
- Bauer F, 2008. Compartmental models in epidemiology (https://link.springer.com/chapter/10.1007/978-3-540-78911-6_2).
Owner
- Name: SABS-R3-Epidemiology
- Login: SABS-R3-Epidemiology
- Kind: organization
- Repositories: 18
- Profile: https://github.com/SABS-R3-Epidemiology
Citation (CITATION.cff)
cff-version: 1.2.0
title: Seirmo
message: >-
If you use this software, please cite it using the
metadata from this file.
type: software
authors:
- given-names: Hui Jia
family-names: Farm
- given-names: Siting
family-names: Miao
- given-names: David
family-names: Augustin
- given-names: Kit
family-names: Gallagher
- given-names: Matthew
family-names: Ghosh
- given-names: Nicholas
family-names: Fan
- given-names: Patricia
family-names: Lamirande
- given-names: Elizabeth
family-names: Hayman
- given-names: Ioana
family-names: Bouros
- given-names: Richard
family-names: Creswell
- given-names: Luke
family-names: Heirene
identifiers:
- type: doi
value: 10.5281/zenodo.14422644
description: The Zenodo Repository
repository-code: 'https://github.com/SABS-R3-Epidemiology/seirmo'
license: BSD-3-Clause
version: 1.0.0
GitHub Events
Total
- Delete event: 4
- Issue comment event: 9
- Push event: 41
- Pull request review comment event: 2
- Pull request review event: 9
- Pull request event: 14
- Create event: 5
Last Year
- Delete event: 4
- Issue comment event: 9
- Push event: 41
- Pull request review comment event: 2
- Pull request review event: 9
- Pull request event: 14
- Create event: 5
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 57
- Total pull requests: 51
- Average time to close issues: 28 days
- Average time to close pull requests: 5 days
- Total issue authors: 7
- Total pull request authors: 10
- Average comments per issue: 1.21
- Average comments per pull request: 1.59
- Merged pull requests: 50
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 1
- Pull requests: 7
- Average time to close issues: 16 days
- Average time to close pull requests: 7 days
- Issue authors: 1
- Pull request authors: 3
- Average comments per issue: 2.0
- Average comments per pull request: 1.14
- Merged pull requests: 6
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- DavAug (38)
- FarmHJ (8)
- rccreswell (4)
- KCGallagher (3)
- NicholasFan235 (2)
- siting-miao (1)
- mghosh00 (1)
Pull Request Authors
- FarmHJ (23)
- siting-miao (12)
- KCGallagher (5)
- DavAug (3)
- mghosh00 (2)
- I-Bouros (2)
- rccreswell (1)
- Elizabeth-Hayman (1)
- NicholasFan235 (1)
- YunliQi (1)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- gunicorn ==20.0.4
- Dependencies *
- dash *
- dash-bootstrap-components *
- dash-core-components *
- dash-daq *
- dash-html-components *
- numpy *
- pandas *
- parameterized *
- pints *
- plotly *
- scipy *
- actions/checkout v1 composite
- actions/setup-python v1 composite
- actions/checkout v1 composite
- actions/setup-python v1 composite
- actions/checkout v1 composite
- actions/setup-python v1 composite
- actions/checkout v1 composite
- actions/setup-python v1 composite
- actions/checkout v1 composite
- actions/setup-python v1 composite
- actions/checkout v1 composite
- actions/setup-python v1 composite
- numpy >=1.8
- sphinx >=1.5,