changeset 126:8d50cf0c3d5f draft

Uploaded
author luca_milaz
date Sun, 21 Jul 2024 20:08:46 +0000
parents 4f889150f278
children b99132184156
files marea_2/ras_to_bounds.py
diffstat 1 files changed, 2 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/marea_2/ras_to_bounds.py	Sun Jul 21 20:04:28 2024 +0000
+++ b/marea_2/ras_to_bounds.py	Sun Jul 21 20:08:46 2024 +0000
@@ -111,11 +111,11 @@
     for reaction in rxns_ids:
         model_new.reactions.get_by_id(reaction).lower_bound=float(df_FVA.loc[reaction,"minimum"])
         model_new.reactions.get_by_id(reaction).upper_bound=float(df_FVA.loc[reaction,"maximum"])
-        
+
     for cellName, ras in ras.iterrows():
         if(ras is not  None):
             for reaction in rxns_ids:
-                if reaction in ras.keys():
+                if (reaction in ras.keys() and ras[reaction] != None):
                     lower_bound=model_new.reactions.get_by_id(reaction).lower_bound
                     upper_bound=model_new.reactions.get_by_id(reaction).upper_bound
                     valMax=float((upper_bound)*ras[reaction])
@@ -163,10 +163,6 @@
 
     ARGS.output_folder = 'ras_to_bounds/'
 
-    utils.logWarning(
-            ARGS.input_ras,
-            ARGS.out_log)
-
     mediumPath = utils.FilePath("medium", ".csv", prefix = ARGS.output_folder)
 
     if(ARGS.ras_selector == True):