Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RuntimeWarning: invalid value encountered in sqrt, and output pge with NaN value #34

Open
Steven-Shixq opened this issue Aug 31, 2022 · 3 comments

Comments

@Steven-Shixq
Copy link

Hi, thanks for the useful package.

When I run the test file with this software it works fine until when processing my own data it outputs an error like:

RuntimeWarning: invalid value encountered in sqrt.

Could you give me any advice to solve this problem?

Here is the error log:

Popcorn version 1.0
(C) 2015-2019 Brielin C Brown
University of California, Berkeley
GNU General Public License v3

Invoking command: python /root/miniconda3/lib/python3.9/site-packages/popcorn/__main__.py fit -v 3 --cfile EUR_EAS_all_gen_eff.cscore --gen_effect --sfile1 EUR.txt --sfile2 EAS.txt out.txt
Beginning analysis at Wed Aug 31 20:06:51 2022
Analyzing a pair of traits in two populations
11916706 7376075 SNPs detected in input.
3552105 SNPs remaining after merging with score file.
3528699 SNPs remaining after filtering on AF and self-compliment SNPs.
/root/miniconda3/lib/python3.9/site-packages/popcorn/fit.py:288: RuntimeWarning: invalid value encountered in sqrt
  pg = P_Res(x=res_wls.params.values[1]/np.sqrt(h1.h_res.x[1]*h2.h_res.x[1]))
/root/miniconda3/lib/python3.9/site-packages/popcorn/fit.py:223: RuntimeWarning: invalid value encountered in sqrt
  hgr = pgr*np.sqrt(h1r*h2r)
Initial estimate:
       Val (obs)  SE
h1^2   0.031604 NaN
h2^2  -0.233816 NaN
pg          NaN NaN
Performing jackknife estimation of the standard error using 200 blocks of size 17643 .
Jackknife iter: 1 
/root/miniconda3/lib/python3.9/site-packages/popcorn/fit.py:288: RuntimeWarning: invalid value encountered in sqrt
  pg = P_Res(x=res_wls.params.values[1]/np.sqrt(h1.h_res.x[1]*h2.h_res.x[1]))
/root/miniconda3/lib/python3.9/site-packages/popcorn/fit.py:237: RuntimeWarning: invalid value encountered in sqrt
  hg = res[4].x*np.sqrt(res[0].h_res.x[1]*res[2].h_res.x[1])
Jackknife iter: 2 
/root/miniconda3/lib/python3.9/site-packages/popcorn/fit.py:288: RuntimeWarning: invalid value encountered in sqrt
  pg = P_Res(x=res_wls.params.values[1]/np.sqrt(h1.h_res.x[1]*h2.h_res.x[1]))
/root/miniconda3/lib/python3.9/site-packages/popcorn/fit.py:237: RuntimeWarning: invalid value encountered in sqrt
  hg = res[4].x*np.sqrt(res[0].h_res.x[1]*res[2].h_res.x[1])
Jackknife iter: 3 
/root/miniconda3/lib/python3.9/site-packages/popcorn/fit.py:288: RuntimeWarning: invalid value encountered in sqrt
  pg = P_Res(x=res_wls.params.values[1]/np.sqrt(h1.h_res.x[1]*h2.h_res.x[1]))
/root/miniconda3/lib/python3.9/site-packages/popcorn/fit.py:237: RuntimeWarning: invalid value encountered in sqrt
  hg = res[4].x*np.sqrt(res[0].h_res.x[1]*res[2].h_res.x[1])
  ...
  
        Val (obs)        SE          Z     P (Z)
h1^2   0.031604  0.002202  14.349459  0.000000
h2^2  -0.233816  0.343909  -0.679877  0.496582
pge         NaN       NaN        NaN       NaN
Analysis finished at Wed Aug 31 20:21:06 2022
Total time elapsed: 855.33

Please let me know if you need any more information.

Best,
Shixq

@yc-long
Copy link

yc-long commented May 25, 2024

I wonder if you have solved the problem now that I am also experiencing it.

@zasgel
Copy link

zasgel commented Sep 4, 2024

Hi I am having the same issue, has anyone found the solution?

@lanshanxuying
Copy link

Hi, I have had the same problem. I wonder is there any solution about this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants