changeset 156:11f9ed694ad4 draft

Uploaded
author bimib
date Tue, 23 Jul 2024 12:54:19 +0000
parents 50d883e23477
children 899803ee928f
files marea_2/marea.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/marea_2/marea.py	Mon Jul 22 11:28:36 2024 +0000
+++ b/marea_2/marea.py	Tue Jul 23 12:54:19 2024 +0000
@@ -218,7 +218,7 @@
     elif avg2 == 0:
         return 'INF'
     else:
-        return math.log(avg1 / avg2, 2)
+        return (avg1 - avg2) / abs(avg2)
     
 def fix_style(l :str, col :Optional[str], width :str, dash :str) -> str:
     """
@@ -722,7 +722,7 @@
                 p_value = computePValue(nets1, nets2)
                 avg1 = sum(nets1)   / len(nets1)
                 avg2 = sum(nets2)   / len(nets2)
-                net = (avg1 - avg2) / abs(avg2)
+                net = fold_change(avg1, avg2)
                 
                 if math.isnan(net): continue
                 tmp[reactId[:-1] + "RV"] = [p_value, net, avg1, avg2]