Mercurial > repos > bimib > cobraxy
diff COBRAxy/flux_to_map.py @ 211:4e368ecd4fb6 draft
Uploaded
author | francesco_lapi |
---|---|
date | Thu, 28 Nov 2024 15:41:30 +0000 |
parents | df664d1a86d4 |
children | ba7043091fe3 |
line wrap: on
line diff
--- a/COBRAxy/flux_to_map.py Thu Nov 28 14:07:11 2024 +0000 +++ b/COBRAxy/flux_to_map.py Thu Nov 28 15:41:30 2024 +0000 @@ -727,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, '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 @@ -759,14 +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))