Skip to content

hpvsim/hpvsim_tanzania

Repository files navigation

hpvsim_tanzania

An HPVsim model of cervical cancer for Tanzania, calibrated to Globocan/IARC incidence data. Built on hpvsim v2.3.0.

Install

pip install -r requirements.txt

Requires hpvsim==2.3.0.

What's here

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.

Data provenance

  • 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.

How to run

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 comparison

Calibration compute: the calibration is only fast on multi-core machines. Run the run_calibration step on a VM; use the plot_calibration step locally to extract the best parameters into results/tanzania_pars.obj.

Calibration status

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.

Testing

pytest tests/ -k "debug or load or scenarios"   # fast subset (also run in CI)
pytest tests/                                   # full, incl. ~1-2 min ASR validation

About

HPVsim analyses in Tanzania

Resources

License

Stars

0 stars

Watchers

4 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages