Skip to content

Commit 9b71bc3

Browse files
authored
Update aa_synthesis_sensitivity variant for rev kcat parameter (#1211)
* Include rev kcat parameter and update FACTORS in aa_synthesis_sensitivity variant * Better check for if a variant needs to be run
1 parent 0097ca8 commit 9b71bc3

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

models/ecoli/sim/variants/aa_synthesis_sensitivity.py

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,16 @@
1010
sim_data.process.metabolism.aa_reverse_kms
1111
sim_data.process.metabolism.aa_degradation_kms
1212
13-
Expected variant indices (dependent on length of FACTORS and sim_data.molecule_groups.amino_acids):
14-
0-6: range of values for first parameter, first amino acid, first media condition
15-
0-34: range of parameters and values for first amino acid, first media condition
16-
0-734: range of parameters and values over all amino acids for first media condition
17-
0-1469: all changes
13+
Expected variant indices (dependent on length of FACTORS, PARAMETERS,
14+
sim_data.molecule_groups.amino_acids and MEDIA_IDS as noted below each group):
15+
0-5: range of values for first parameter, first amino acid, first media condition
16+
# FACTORS
17+
0-35: range of parameters and values for first amino acid, first media condition
18+
# FACTORS x # PARAMETERS
19+
0-755: range of parameters and values over all amino acids for first media condition
20+
# FACTORS x # PARAMETERS x # amino acids
21+
0-1511: all changes
22+
# FACTORS x # PARAMETERS x # amino acids x # MEDIA_IDS
1823
1924
TODO:
2025
- Run this for all AA additions or just Glt and control?
@@ -25,8 +30,8 @@
2530
import numpy as np
2631

2732

28-
FACTORS = [0, 0.1, 0.5, 1.5, 2, 5, 10] # TODO: run factor of 1 once for each media condition
29-
PARAMETERS = ['aa_kcats', 'aa_kis', 'aa_upstream_kms', 'aa_reverse_kms', 'aa_degradation_kms']
33+
FACTORS = [0, 0.1, 0.5, 2, 5, 10] # TODO: run factor of 1 once for each media condition
34+
PARAMETERS = ['aa_kcats_fwd', 'aa_kcats_rev', 'aa_kis', 'aa_upstream_kms', 'aa_reverse_kms', 'aa_degradation_kms']
3035
N_PARAM_VALUES = len(FACTORS) * len(PARAMETERS)
3136
MEDIA_IDS = [5, 19] # Glt and control for now (need to update the analysis plot if changed)
3237

@@ -59,7 +64,7 @@ def aa_synthesis_sensitivity(sim_data, index):
5964
aa_idx = get_aa_index(index, sim_data)
6065
param, factor = get_adjustment(index)
6166
values = getattr(sim_data.process.metabolism, param)
62-
if np.all(values[aa_idx] == values[aa_idx] * factor):
67+
if np.all(~np.isfinite(values[aa_idx])) or np.all(values[aa_idx] == 0):
6368
# Skip sims for parameters that are 0 or inf and will not be updated
6469
raise ValueError('No change to params - not running variant sims.')
6570
values[aa_idx] *= factor

0 commit comments

Comments
 (0)