Mercurial > repos > bimib > cobraxy
comparison COBRAxy/ras_to_bounds.py @ 221:d0e2251fe8a6 draft
Uploaded
author | luca_milaz |
---|---|
date | Sat, 14 Dec 2024 19:02:16 +0000 |
parents | fa5483499199 |
children | 4c0bb0186d38 |
comparison
equal
deleted
inserted
replaced
220:fa5483499199 | 221:d0e2251fe8a6 |
---|---|
131 scaling_factor = ras_row[reaction] | 131 scaling_factor = ras_row[reaction] |
132 lower_bound=bounds.loc[reaction, "lower_bound"] | 132 lower_bound=bounds.loc[reaction, "lower_bound"] |
133 upper_bound=bounds.loc[reaction, "upper_bound"] | 133 upper_bound=bounds.loc[reaction, "upper_bound"] |
134 valMax=float((upper_bound)*scaling_factor) | 134 valMax=float((upper_bound)*scaling_factor) |
135 valMin=float((lower_bound)*scaling_factor) | 135 valMin=float((lower_bound)*scaling_factor) |
136 if np.isnan(valMax) or np.isnan(valMin): | 136 if np.isnan(scaling_factor): |
137 warning(f"RAS values for {reaction}is None") | 137 warning(f"scaling_factor values for {reaction}is None") |
138 if upper_bound!=0 and lower_bound==0: | 138 if upper_bound!=0 and lower_bound==0: |
139 new_bounds.loc[reaction, "upper_bound"] = valMax | 139 new_bounds.loc[reaction, "upper_bound"] = valMax |
140 if upper_bound==0 and lower_bound!=0: | 140 if upper_bound==0 and lower_bound!=0: |
141 new_bounds.loc[reaction, "lower_bound"] = valMin | 141 new_bounds.loc[reaction, "lower_bound"] = valMin |
142 if upper_bound!=0 and lower_bound!=0: | 142 if upper_bound!=0 and lower_bound!=0: |