comparison COBRAxy/ras_to_bounds.py @ 220:fa5483499199 draft

Uploaded
author luca_milaz
date Sat, 14 Dec 2024 18:59:31 +0000
parents 264a10b57481
children d0e2251fe8a6
comparison
equal deleted inserted replaced
219:264a10b57481 220:fa5483499199
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(valMax is None or valMin is None): 136 if np.isnan(valMax) or np.isnan(valMin):
137 warning(f"RAS values for {reaction}is None") 137 warning(f"RAS 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