Skip to content

Commit

Permalink
Narrow param grid for serotypes
Browse files Browse the repository at this point in the history
  • Loading branch information
sidneymbell committed Jan 27, 2019
1 parent c6f6c47 commit 388fe96
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions fitness_model/antigenic_fitness.py
Expand Up @@ -54,7 +54,7 @@ def get_Dij(j, i):
return af.titers[(j, i)] return af.titers[(j, i)]
except KeyError: except KeyError:
return af.titers[(serotype_of(j), serotype_of(i))] return af.titers[(serotype_of(j), serotype_of(i))]

def sum_over_j(i, past_timepoint): def sum_over_j(i, past_timepoint):
''' Return a frequency-weighted sum of the probability of protection from i given prior exposure to j ''' ''' Return a frequency-weighted sum of the probability of protection from i given prior exposure to j '''
antigenic_distance = [ get_Dij(j, i) if i != j else 0. for j in af.clades] # Pull precomputed antigenic distance between virus i and serum j antigenic_distance = [ get_Dij(j, i) if i != j else 0. for j in af.clades] # Pull precomputed antigenic distance between virus i and serum j
Expand Down Expand Up @@ -540,9 +540,9 @@ def plot_trajectory(af, trajectory, ax=None):


elif args.mode == 'fit': elif args.mode == 'fit':


d1_vals = np.linspace(0,7,8) d1_vals = np.linspace(1,3,8)
d2_vals = np.linspace(0,7,8) d2_vals = np.linspace(1,3,8)
d3_vals = np.linspace(0,7,8) d3_vals = np.linspace(0,2,8)


output = [] output = []
for (d1,d2,d3) in product(d1_vals, d2_vals, d3_vals): for (d1,d2,d3) in product(d1_vals, d2_vals, d3_vals):
Expand Down
6 changes: 3 additions & 3 deletions fitness_model/helper_scripts/sbatch_param_wrapper.py
Expand Up @@ -14,9 +14,9 @@
if not os.path.isdir(out_path): if not os.path.isdir(out_path):
os.mkdir(out_path) os.mkdir(out_path)


beta_vals = np.linspace(0,3,8) beta_vals = np.linspace(2,3,8)
gamma_vals = np.linspace(0,3,8) gamma_vals = np.linspace(0.5,1.5,8)
sigma_vals = np.linspace(0,3,8) sigma_vals = np.linspace(0,1,8)


for (b,g,s) in product(beta_vals, gamma_vals, sigma_vals): for (b,g,s) in product(beta_vals, gamma_vals, sigma_vals):
name = ''.join(random.choice('0123456789abcdef') for n in xrange(30)) name = ''.join(random.choice('0123456789abcdef') for n in xrange(30))
Expand Down

0 comments on commit 388fe96

Please sign in to comment.