changeset 274:d54d6728b204 draft

Uploaded
author francesco_lapi
date Mon, 05 May 2025 10:15:46 +0000
parents 99703bcaa290
children e87aeb3a33cd
files COBRAxy/flux_to_map.py
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/COBRAxy/flux_to_map.py	Mon May 05 10:15:23 2025 +0000
+++ b/COBRAxy/flux_to_map.py	Mon May 05 10:15:46 2025 +0000
@@ -726,6 +726,7 @@
             avg1 = sum(l1) / len(l1)
             avg2 = sum(l2) / len(l2)
             f_c = fold_change(avg1, avg2)
+            if math.isnan(p_value) or (isinstance(f_c, float) and math.isnan(f_c)): continue
             if not isinstance(z_score, str) and max_z_score < abs(z_score): max_z_score = abs(z_score)
             
             tmp[reactId] = [float(p_value), f_c, z_score, avg1, avg2]