InstituteforDiseaseModeling / malaria-model_validation

1 stars 2 forks source link

malaria-model_validation

Table of Contents

User Installation

Note: we recemend to upgrade pip to the latest version before installation:

pip install --upgrade pip

Installation

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

Pre-requisites

If you see the following error during installation: alt text 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".

Run Workflow

Login to Comps

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. alt text

Option 1: Run all Sites with Snakemake

Run the snakemake pipeline with all sites in simulation_coordinator.csv:

snakemake -j

Option 2: Run Sites in Certain Subset(s) with Snakemake

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

How to Change Default Setting

Snakemake Tips

Check Plots and Final Report

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.