changeset 170:2c75a3b96bc0 draft

Uploaded
author francesco_lapi
date Fri, 26 Jul 2024 12:43:28 +0000
parents c9908e5f107f
children f0a060e4e217
files marea_2/marea.py
diffstat 1 files changed, 5 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/marea_2/marea.py	Fri Jul 26 10:59:40 2024 +0000
+++ b/marea_2/marea.py	Fri Jul 26 12:43:28 2024 +0000
@@ -732,16 +732,11 @@
             reactDir = ReactionDirection.fromReactionId(reactId)
             # Net score is computed only for reversible reactions when user wants it on arrow tips or when RAS datasets aren't used
             if (ARGS.net or not ARGS.using_RAS) and reactDir is not ReactionDirection.Unknown:
-                try: 
-                    position = ids.index(reactId[:-1] + ('B' if reactDir is ReactionDirection.Direct else 'F'))
-                    nets1 = np.subtract(l1, dataset1Data[position])
-                    nets2 = np.subtract(l2, dataset2Data[position])
-                except ValueError: 
-                    if ARGS.net:
-                        continue # we look for the complementary id, if not found we skip
-                    else:
-                        nets1 = l1
-                        nets2 = l2
+                try: position = ids.index(reactId[:-1] + ('B' if reactDir is ReactionDirection.Direct else 'F'))
+                except ValueError: continue # we look for the complementary id, if not found we skip
+
+                nets1 = np.subtract(l1, dataset1Data[position])
+                nets2 = np.subtract(l2, dataset2Data[position])
 
                 p_value, z_score = computePValue(nets1, nets2)
                 avg1 = sum(nets1)   / len(nets1)