An HPVsim model of cervical cancer for Tanzania, calibrated to Globocan/IARC incidence data. Built on hpvsim v2.3.0.
pip install -r requirements.txtRequires hpvsim==2.3.0.
| File | Purpose |
|---|---|
run_sim.py |
Defines the Tanzania simulation (make_sim, run_sim). Tanzania-specific parameters (sexual behaviour, mixing, layer probabilities) are inlined here. |
run_calibration.py |
Calibrates the model to Tanzania data (hpv.Calibration). |
run_scenarios.py |
Illustrative screen-&-treat scenarios (VIA vs HPV-test). |
utils.py |
Fonts, sexual-behaviour data, calibration datafiles. |
analyzers.py |
cohort_cancers analyzer for projection runs. |
data/ |
Calibration targets (cancer cases, ASR, genotype distributions) + sexual-behaviour parameters. |
results/tanzania_pars.obj |
Calibrated parameter set (validated under v2.3.0). |
tests/ |
Smoke + validation tests. |
tanzania_asr_cancer_incidence.csv,tanzania_cancer_cases.csv— Globocan/IARC cervical cancer incidence (ASR ≈ 62.5 per 100,000, 2020).tanzania_cancer_types.csv,tanzania_cin3_types.csv— HPV genotype distribution in cancers / CIN3 (ICO/IARC HPV Information Centre).sb_pars_{women,men}_lognormal.csv— DHS-fitted sexual-debut distributions.
Data and the calibration framework were ported from hpvsim_1dose.
python run_sim.py # single baseline run + plot (local)
# Calibration — RUN only on a multi-core VM (edit `to_run` in the file):
python run_calibration.py # 'plot_calibration' extracts/plots locally;
# 'run_calibration' fits (VM only)
python run_scenarios.py # VIA vs HPV-test screen-&-treat comparisonCalibration compute: the calibration is only fast on multi-core machines. Run the
run_calibrationstep on a VM; use theplot_calibrationstep locally to extract the best parameters intoresults/tanzania_pars.obj.
The parameter set in results/tanzania_pars.obj reproduces the Globocan 2020 ASR target
(model ≈ 60.7 vs target 62.5 per 100,000) under hpvsim v2.3.0 — see
tests/test_baseline.py.
pytest tests/ -k "debug or load or scenarios" # fast subset (also run in CI)
pytest tests/ # full, incl. ~1-2 min ASR validation