# HG changeset patch
# User francesco_lapi
# Date 1732185828 0
# Node ID 1306b3543e57ae5ce0a06d3e4368ad4b5ecc54fd
# Parent  07539860dbcafe16b36f7d56af75ffcd1a29b7bb
Uploaded

diff -r 07539860dbca -r 1306b3543e57 COBRAxy/flux_to_map.py
--- a/COBRAxy/flux_to_map.py	Thu Nov 21 09:42:58 2024 +0000
+++ b/COBRAxy/flux_to_map.py	Thu Nov 21 10:43:48 2024 +0000
@@ -497,8 +497,8 @@
             except ZeroDivisionError: pass
         # TODO CHECK RV
         #if not reactionId.endswith("_RV"): # RV stands for reversible reactions
-        #    Arrow(width, ArrowColor.fromFoldChangeSign(foldChange)).styleReactionElements(metabMap, reactionId)
-        #    continue
+        #   Arrow(width, ArrowColor.fromFoldChangeSign(foldChange)).styleReactionElements(metabMap, reactionId)
+        #   continue
         
         #reactionId = reactionId[:-3] # Remove "_RV"
         
@@ -726,9 +726,10 @@
             p_value, z_score = computePValue(l1, l2)
             avg1 = sum(l1) / len(l1)
             avg2 = sum(l2) / len(l2)
-            avg = fold_change(avg1, avg2)
+            f_c = fold_change(avg1, avg2)
             if not isinstance(z_score, str) and max_z_score < abs(z_score): max_z_score = abs(z_score)
-            tmp[reactId] = [float(p_value), avg, z_score, avg1, avg2]
+            print(reactId, float(p_value), f_c, z_score, avg1, avg2)
+            tmp[reactId] = [float(p_value), f_c, z_score, avg1, avg2]
         except (TypeError, ZeroDivisionError): continue
     
     return tmp, max_z_score