changeset 219:264a10b57481 draft

Uploaded
author luca_milaz
date Sat, 14 Dec 2024 18:56:53 +0000
parents 8d1988935e1f
children fa5483499199
files COBRAxy/ras_to_bounds.py
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/COBRAxy/ras_to_bounds.py	Sat Dec 14 18:50:08 2024 +0000
+++ b/COBRAxy/ras_to_bounds.py	Sat Dec 14 18:56:53 2024 +0000
@@ -133,6 +133,8 @@
         upper_bound=bounds.loc[reaction, "upper_bound"]
         valMax=float((upper_bound)*scaling_factor)
         valMin=float((lower_bound)*scaling_factor)
+        if(valMax is None or valMin is None):
+            warning(f"RAS values for {reaction}is None")
         if upper_bound!=0 and lower_bound==0:
             new_bounds.loc[reaction, "upper_bound"] = valMax
         if upper_bound==0 and lower_bound!=0:
@@ -160,6 +162,7 @@
     new_bounds = apply_ras_bounds(bounds, ras_row)
     if new_bounds.isnull().values.any():
         warning(f"RAS values for {cellName} contain NaN values. Skipping this cell.")
+        return
     new_bounds.to_csv(output_folder + cellName + ".csv", sep='\t', index=True)
     pass