Analyses of diagnostics for discharging STIs in Zimbabwe
Requires Starsim v2 and STIsim v1.
- Create a new virtual environment:
conda create -n stisim python=3.11 -y; conda activate stisim - Install requirements:
pip install -r requirements.txt - To check that it works, you can run
python model.py
Zimbabwe’s national guidelines for STI management recommend that high-risk women presenting with vaginal discharge syndrome (VDS) are prescribed antibiotics for gonorrhea (NG), chlamydia (CT), trichomoniasis (TV), and bacterial vaginosis (BV). The performance of this approach depends on rates of care-seeking and implementation of treatment guidelines. This repository contains scripts to analyze the efficiency and impact of syndromic management on STI transmission, and the potential impact of an NG/CT/TV point-of-care (POC) test for women with VDS.
datacontains all the input data used for the model, as well as thezimbabwe_sti_data.csvfile that contains the data we calibrate to.resultscontains result files - these are generated by running the fourrun_*.pyscripts outlined below, and the are consumed by running theplot_*.pyscripts.
hiv_model.pyandmodel.pycontain an HIV model and a co-transmitting STI-HIV model, respectively. These can be run directly, but more often they will be called by arun_*.pyscript in the process of some analysis.analyzers.pycontain some analyzers used within the analysesinterventions.pycontains interventions, specifically syndromic management and a hypothetical point-of-care (POC) diagnosticutils.pycontains utilitiesprocess_ihme_data.pyis needed to process a large result file (not in the repo) and output the data filedata/zimbabwe_sti_data.csvused for calibration
- Run
run_hiv_calibration.pyto calibrate the HIV model. - Run
run_calibration.pyto calibrate the STI model. This produces the following files:results/zim_sti_calib_stats_treat*.dfresults/zim_sti_par_stats_treat*.dfOnce re-generated, these can be directly updated in the repo via git. The calibration also produces a much larger file, which should not be added to the repo but which can be inspected if required.
- Run
run_plot_data.pyto process the outputs of the calibration and turn them into the format used for creating plots of the calibrated model. This produces the following files:results/epi_df_treat*.dfresults/hiv_df_treat*.dfresults/sw_df_treat*.df
- Run
run_syndromic_scens.pyto run the scenarios that assess the impact of a POC diagnostic. This produces the following files:results/overtx.objresults/synd_health.objresults/synd_treat.obj
plot_calibrations.pyconsumes the result files:results/zim_sti_calib_stats_treat*.dfresults/zim_sti_par_stats_treat*.dfand produces the plots shown in the supplementary materials
plot_fig2_epi.pyconsumes the result files:results/epi_df_treat*.dfresults/sw_df_treat*.dfand produces Figure 2 in the paper
plot_fig3_pars.pyconsumes the result files:results/zim_sti_calib_stats_treat*.dfresults/zim_sti_par_stats_treat*.dfand produces Figure 3 in the paper
plot_fig4_overtreatment.pyconsumes the result files:results/overtx.objresults/synd_health.objresults/synd_treat.objand produces Figure 4 in the paper
plot_sims.pyis called byplot_calibrations.py