Skip to content
Permalink
Browse files

Sbatch wrapper for sims

  • Loading branch information...
sidneymbell
sidneymbell committed Mar 31, 2019
1 parent 837ea36 commit 74586845df4c69e15a1508b178d78b7fd998809f
Showing with 23 additions and 0 deletions.
  1. +23 −0 fitness_model/simulation/simulation_sbatch_param_wrapper.py
@@ -0,0 +1,23 @@
import os
import numpy as np
import random
from itertools import product
import sys

frequency_path = './sim_simulated_freqs.csv'
titer_path = '../../data/frequencies/interserotype_Dij.tsv'
out_path = './model_performance/'

if not os.path.isdir(out_path):
os.mkdir(out_path)

beta_vals = np.linspace(0.0,3.,7)
gamma_vals = np.linspace(0.0,3.,7)
sigma_vals = np.linspace(0.,3.,7)

for (b,g,s) in product(beta_vals, gamma_vals, sigma_vals):
name = ''.join(random.choice('0123456789abcdef') for n in xrange(30))
cmd = 'python ../antigenic_fitness.py --mode fit --frequency_path %s --titer_path %s --out_path %s --name %s --years_back 2 --years_forward 2 --beta %f --gamma %f --sigma %f --DENV4_f0 0'%(frequency_path, titer_path, out_path, name, b,g,s)

os.system('sbatch -t 20:00:00 --mem 1024 --wrap="%s"'%cmd)
os.system('sleep 0.05')

0 comments on commit 7458684

Please sign in to comment.
You can’t perform that action at this time.