Skip to content
Snippets Groups Projects
Commit 713691a2 authored by Hanna  JULIENNE's avatar Hanna JULIENNE
Browse files

Update file compute_score.py

parent 1497e1fc
No related branches found
No related tags found
No related merge requests found
Pipeline #147377 passed
......@@ -25,13 +25,9 @@ def compute_z_score(mgwas):
print(mgwas.columns)
mgwas["computed_z"] = np.sqrt(ss.chi2.isf(mgwas['pval'], 1))
if 'z' in mgwas.columns:
sign_vect = np.sign(mgwas.z)
mgwas.loc[mgwas["computed_z"].isin([np.inf]), 'computed_z'] = mgwas["z"]
elif 'beta_or_Z' in mgwas.columns:
sign_vect = np.sign(mgwas.beta)
if 'beta_or_Z' in mgwas.columns:
sign_vect = np.sign(mgwas.beta_or_Z)
mgwas["computed_z"] = mgwas["computed_z"].replace(np.inf, 37.537836095576054)
else:
if "OR" in mgwas.columns:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment