# HG changeset patch # User francesco_lapi # Date 1732186678 0 # Node ID 1dda40a6003756d22c1c14ebaec0709dd201e8d4 # Parent 1306b3543e57ae5ce0a06d3e4368ad4b5ecc54fd Uploaded diff -r 1306b3543e57 -r 1dda40a60037 COBRAxy/flux_to_map.py --- 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))