Mercurial > repos > bimib > cobraxy
comparison COBRAxy/flux_to_map.py @ 274:d54d6728b204 draft
Uploaded
author | francesco_lapi |
---|---|
date | Mon, 05 May 2025 10:15:46 +0000 |
parents | 32d015071c5c |
children | e87aeb3a33cd |
comparison
equal
deleted
inserted
replaced
273:99703bcaa290 | 274:d54d6728b204 |
---|---|
724 try: | 724 try: |
725 p_value, z_score = computePValue(l1, l2) | 725 p_value, z_score = computePValue(l1, l2) |
726 avg1 = sum(l1) / len(l1) | 726 avg1 = sum(l1) / len(l1) |
727 avg2 = sum(l2) / len(l2) | 727 avg2 = sum(l2) / len(l2) |
728 f_c = fold_change(avg1, avg2) | 728 f_c = fold_change(avg1, avg2) |
729 if math.isnan(p_value) or (isinstance(f_c, float) and math.isnan(f_c)): continue | |
729 if not isinstance(z_score, str) and max_z_score < abs(z_score): max_z_score = abs(z_score) | 730 if not isinstance(z_score, str) and max_z_score < abs(z_score): max_z_score = abs(z_score) |
730 | 731 |
731 tmp[reactId] = [float(p_value), f_c, z_score, avg1, avg2] | 732 tmp[reactId] = [float(p_value), f_c, z_score, avg1, avg2] |
732 except (TypeError, ZeroDivisionError): continue | 733 except (TypeError, ZeroDivisionError): continue |
733 | 734 |