Table of Contents
Note: we recemend to upgrade pip to the latest version before installation:
pip install --upgrade pip
Run the following command: ( it will install this project in editable/'develop' mode):
pip install -e . -r requirements.txt
or you can run
pip install -e . -i https://packages.idmod.org/api/pypi/pypi-production/simple
If you see the following error during installation: You may need to install C++ Build Tools from this link: https://visualstudio.microsoft.com/visual-cpp-build-tools/
If you see error about conflicting dependencies on Pandas:
ERROR: Cannot install idmtools-cli and malaria-model-validation because these package versions have conflicting dependencies.
The conflict is caused by:
datar 0.0.0 depends on pandas<2.0 and >=1.2
plotnine 0.1.0 depends on pandas>=0.19.0
idmtools 1.6.6 depends on pandas<1.2 and >=1.1.4
Idmtools has dependencies with an old pandas version, we have opened a ticket to update this dependency on idmtools and are waiting for a patch release: https://github.com/InstituteforDiseaseModeling/idmtools/issues/1774. For now, you can workarround this error by removing 'datar' from our requirements.txt and install it after installating our package with "pip install datar".
If you haven't login to Comps for a while, you can run the following script to login and cache your credential:
cd simulations
python3 create_auth_token_args.py -u {your-comps-username}
When you see "Password:" in the terminal, enter your comps password and hit enter key.
Run the snakemake pipeline with all sites in simulation_coordinator.csv:
snakemake -j
Run the snakemake pipeline with sites in one or multiple subsets in simulation_coordinator.csv:
snakemake --config -s="core_relationship" -j
or
snakemake --config -s="core_relationship, infection_duration" -j
Some snakemake tips about running the workflow:
If you want to re-run the whole workflow, clean up your environment with "snakemake clean -j" and run "snakemake -j" again:
snakemake clean -j
snakemake -j
If you make change locally in simulation_coordinator.csv, run the generate_site_rules.py to regenerate snakemake rules(run this script every time you update your simulation_coordinator.csv):
python3 generate_site_rules.py
snakemake -j
If you want to re-run the analyzers steps with previous experiments you ran, you can delete the analyzer id files and all following the analyzers steps and run:
snakemake clean_ana -j
snakemake -j
Simular to previous scenario, if you want to only re-run starting from the download steps:
snakemake clean_download -j
snakemake -j
Simular to previous scenario, if you want to only re-run starting from the plotting steps:
snakemake clean_plot -j
snakemake -j
Simular to previous scenario, if you want to only re-run starting from the reporting steps:
snakemake clean_report -j
snakemake -j
If you want to re-run simulations for certain sites, delete COMPS ID files for those sites that you want to -re-run (/simulations/COMPS_ID/{site_name}_COMPS_ID_exp_submit, _analyzers and _download files) and run "snakemake clean_plot -j" and then "snakemake -j" again.
If you want to re-run the analyzers and plotting steps for certain sites, delete the {site_name}_COMPS_ID_analyzers and _download files only and run "snakemake clean_plot -j" and then "snakemake -j".
Other snakemake tips:
You can check the plots in \malaria-model_validation\report_plots folder and final report: \malaria-model_validation\report\Malaria_model_validationoutput{date}}({time}).pdf.