|
10 | 10 | sim_data.process.metabolism.aa_reverse_kms |
11 | 11 | sim_data.process.metabolism.aa_degradation_kms |
12 | 12 |
|
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 |
18 | 23 |
|
19 | 24 | TODO: |
20 | 25 | - Run this for all AA additions or just Glt and control? |
|
25 | 30 | import numpy as np |
26 | 31 |
|
27 | 32 |
|
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'] |
30 | 35 | N_PARAM_VALUES = len(FACTORS) * len(PARAMETERS) |
31 | 36 | MEDIA_IDS = [5, 19] # Glt and control for now (need to update the analysis plot if changed) |
32 | 37 |
|
@@ -59,7 +64,7 @@ def aa_synthesis_sensitivity(sim_data, index): |
59 | 64 | aa_idx = get_aa_index(index, sim_data) |
60 | 65 | param, factor = get_adjustment(index) |
61 | 66 | 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): |
63 | 68 | # Skip sims for parameters that are 0 or inf and will not be updated |
64 | 69 | raise ValueError('No change to params - not running variant sims.') |
65 | 70 | values[aa_idx] *= factor |
|
0 commit comments