changeset 198:1dda40a60037 draft

Uploaded
author francesco_lapi
date Thu, 21 Nov 2024 10:57:58 +0000
parents 1306b3543e57
children df664d1a86d4
files COBRAxy/flux_to_map.py
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/COBRAxy/flux_to_map.py	Thu Nov 21 10:43:48 2024 +0000
+++ b/COBRAxy/flux_to_map.py	Thu Nov 21 10:57:58 2024 +0000
@@ -716,7 +716,6 @@
     tmp :Dict[str, List[Union[float, FoldChange]]] = {}
     count   = 0
     max_z_score = 0
-
     for l1, l2 in zip(dataset1Data, dataset2Data):
         reactId = ids[count]
         count += 1
@@ -728,7 +727,7 @@
             avg2 = sum(l2) / len(l2)
             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)
-            print(reactId, float(p_value), f_c, z_score, avg1, avg2)
+            print(reactId, 'pValue ', float(p_value), 'fold change ', f_c, 'z_score ', z_score, 'avg1 ', avg1, 'avg2 ', avg2)
             tmp[reactId] = [float(p_value), f_c, z_score, avg1, avg2]
         except (TypeError, ZeroDivisionError): continue
     
@@ -760,12 +759,14 @@
     
     if ARGS.comparison == "manyvsmany":
         for i, j in it.combinations(class_pat.keys(), 2):
+            print(f"Comparing {i} and {j}")
             comparisonDict, max_z_score = compareDatasetPair(class_pat.get(i), class_pat.get(j), ids)
             enrichment_results.append((i, j, comparisonDict, max_z_score))
     
     elif ARGS.comparison == "onevsrest":
         for single_cluster in class_pat.keys():
             rest = [item for k, v in class_pat.items() if k != single_cluster for item in v]
+            print(f"Comparing {single_cluster} and {rest}")
             comparisonDict, max_z_score = compareDatasetPair(class_pat.get(single_cluster), rest, ids)
             enrichment_results.append((single_cluster, "rest", comparisonDict, max_z_score))