Skip to content

Commit

Permalink
this runs please run
Browse files Browse the repository at this point in the history
  • Loading branch information
stitova-idm committed Sep 22, 2023
1 parent 77330e3 commit 38de13c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 5 additions & 3 deletions examples/Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -65,22 +65,24 @@ rule all:
baseline_calibration = r"monique/calibration/baseline_calibration/"
rule serialize_transmission_sweep:
input: baseline_calibration + r"01_serialize_transmission_sweep/params.py",
baseline_calibration + r"01_serialize_transmission_sweep/manifest.py"
baseline_calibration + r"01_serialize_transmission_sweep/manifest.py",
baseline_calibration+ r"01_serialize_transmission_sweep/config_sweep_builders.py"
output: touch(baseline_calibration + r"01_serialize_transmission_sweep/experiment_id.txt")
run:
update_parameters_in_file(input[0],{"years = 30": f"years = 10\n",
"num_seeds = ": "num_seeds = 1\n",
"population_size =": "population_size = 2000\n"})
update_parameters_in_file(input[1],{"USER_PATH = ": f"USER_PATH = r'../data'\n",
"sif_id = None": "sif_id = 'dtk_sif.id'\n"})
update_parameters_in_file(input[2],{"rep_admin:": f" rep_admin: [np.logspace(-1.6, 2, 25)[ii] for ii in [0, 4]] for rep_admin in\n"})
shell(get_command(script=baseline_calibration + r"01_serialize_transmission_sweep/run_simulations.py",
python_version=config['python_version']))

rule run_transmission_sweep:
input: baseline_calibration + r"01_serialize_transmission_sweep/experiment_id.txt",
baseline_calibration + r"02_run_transmission_sweep/params.py",
baseline_calibration + r"02_run_transmission_sweep/manifest.py",
baseline_calibration + r"02_run_transmission_sweep/config_sweep_builders.py",
baseline_calibration + r"02_run_transmission_sweep/config_sweep_builders.py"
output: touch(baseline_calibration + r"02_run_transmission_sweep/experiment_id.txt")
run:
with open(input[0]) as exp_id_file:
Expand All @@ -91,7 +93,7 @@ rule run_transmission_sweep:
"population_size =": "population_size = 2000\n"})
update_parameters_in_file(input[2],{"USER_PATH = ": f"USER_PATH = r'../data'\n",
"sif_id = None": "sif_id = 'dtk_sif.id'\n"})
update_parameters_in_file(input[3],{"rep_admin:": f" rep_admin: [np.logspace(-1.6, 25)[ii] for ii in [0, 8, 20]] for rep_admin in\n"})
update_parameters_in_file(input[3],{"rep_admin:": f" rep_admin: [np.logspace(-1.6, 2, 25)[ii] for ii in [0, 4]] for rep_admin in\n"})
shell(get_command(script=baseline_calibration + r"02_run_transmission_sweep/run_simulations.py",
python_version=config['python_version']))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ def get_sweep_builders(**kwargs):
f'monthly_habitats_1_{params.population_size}.csv'))

sweepspace = {
# rep_admin: np.logspace(-1.6, 2, 25) for rep_admin in lhdf['archetype'].values
rep_admin: [np.logspace(-1.6, 2, 25)[ii] for ii in [0, 4, 8, 12, 16, 20]] for rep_admin in
lhdf['archetype'].values # make sure this matches the values used in the next step
}
Expand Down

0 comments on commit 38de13c

Please sign in to comment.