Closed BogyeomKim closed 3 years ago
Hi Bogyeom- It seems that there might be non-numerical or out-of-range values in the summary statistics. Could you double check to see if the GWAS summary stats have been converted into the required format. I can take a look if you could share data on the chromosome that produced the error.
Thanks for your answer. I've checked the GWAS summary stats was converted into the required format.
Also, I guess this error might not come from the summary stats because I could complete for phi1 (same chromosome, 22) as below.
--ref_dir=/work2/07939/tg872382/stampede2/connectome/stampede2/PRScsx/ld_ref --bim_prefix=/work2/07939/tg872382/stampede2/connectome/stampede2/ABCD_genotype2021/ABCD_QCed_2021_PCair_8620+1579_PRScs/ABCD_QCed_2021_PCair_8620+1579_PRScs_SNPrsid_final --sst_file=['/work2/07939/tg872382/stampede2/connectome/stampede2/ABCD_summarystats/PGC_anxiety_forPRScsx.txt'] --a=1 --b=0.5 --phi=1.0 --n_gwas=[14364] --pop=['EUR'] --n_iter=1000 --n_burnin=500 --thin=5 --out_dir=/work2/08170/amyk01/stampede2/ABCD_PRScsx/Anxiety/prscsx_output --out_name=test_ABCD_Anxiety_EUR_csx --chrom=['22'] --meta=FALSE --seed=1234
... parse reference file: /work2/07939/tg872382/stampede2/connectome/stampede2/PRScsx/ld_ref/snpinfo_mult_1kg_hm3 ... ... 18944 SNPs on chromosome 22 read from /work2/07939/tg872382/stampede2/connectome/stampede2/PRScsx/ld_ref/snpinfo_mult_1kg_hm3 ... ... parse bim file: /work2/07939/tg872382/stampede2/connectome/stampede2/ABCD_genotype2021/ABCD_QCed_2021_PCair_8620+1579_PRScs/ABCD_QCed_2021_PCair_8620+1579_PRScs_SNPrsid_final.bim ... ... 154308 SNPs on chromosome 22 read from /work2/07939/tg872382/stampede2/connectome/stampede2/ABCD_genotype2021/ABCD_QCed_2021_PCair_8620+1579_PRScs/ABCD_QCed_2021_PCair_8620+1579_PRScs_SNPrsid_final.bim ... ... parse EUR sumstats file: /work2/07939/tg872382/stampede2/connectome/stampede2/ABCD_summarystats/PGC_anxiety_forPRScsx.txt ... ... 6330995 SNPs read from /work2/07939/tg872382/stampede2/connectome/stampede2/ABCD_summarystats/PGC_anxiety_forPRScsx.txt ... ... 13991 common SNPs in the EUR reference, EUR sumstats, and validation set ... /opt/apps/intel19/python3/3.7.0/lib/python3.7/site-packages/numpy-1.19.5-py3.7-linux-x86_64.egg/numpy/lib/scimath.py:272: RuntimeWarning: divide by zero encountered in log return nx.log(x) ... parse EUR reference LD on chromosome 22 ... ... align reference LD on chromosome 22 across populations ... ... 13991 valid SNPs across populations ... ... MCMC ... /work2/07939/tg872382/stampede2/connectome/stampede2/PRScsx/mcmc_gtb.py:82: ComplexWarning: Casting complex values to real discards the imaginary part beta[pp][idx_blk] = linalg.solve_triangular(dinvt_chol, beta_tmp, trans='N') --- iter-100 --- --- iter-200 --- --- iter-300 --- --- iter-400 --- --- iter-500 --- --- iter-600 --- --- iter-700 --- --- iter-800 --- --- iter-900 --- --- iter-1000 --- ... Done ...
If you think there's any other way to check, please let me know. I'll try it.
Best regards, Bygoem
2021년 8월 11일 (수) 오후 1:31, Tian Ge @.***>님이 작성:
Hi Bogyeom- It seems that there might be non-numerical or out-of-range values in the summary statistics. Could you double check to see if the GWAS summary stats have been converted into the required format. I can take a look if you could share data on the chromosome that produced the error.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/getian107/PRScsx/issues/10#issuecomment-896492322, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQD26XBVLV6LBTXMJER6UD3T4H4JBANCNFSM5B5ELM4Q . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .
To clarify- the error occurred on chromosome 22 when you used the "auto" version (i.e., without specifying phi) and didn't occur when you set phi to 1.0, right? Would that be possible to share the summary stats for chr 22 so that I can reproduce the error on my end?
The orror occurred on chromosome 22 when I used the 'auto' version and specified phi1e-2 phi1e-4 but it didn't occur when I set phi to 1.0. I attached the summary stat file below. Thanks for your help.
Best regards, Bogyeom PGC_anxiety_forPRScsx.txt https://drive.google.com/file/d/1hM-DziBkK3bx33kbvS9GpVGEuAgzPcbS/view?usp=drive_web
2021년 8월 15일 (일) 오전 3:41, Tian Ge @.***>님이 작성:
To clarify- the error occurred on chromosome 22 when you used the "auto" version (i.e., without specifying phi) and didn't occur when you set phi to 1.0, right? Would that be possible to share the summary stats for chr 22 so that I can reproduce the error on my end?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/getian107/PRScsx/issues/10#issuecomment-898943363, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQD26XBQHNZBGECJ73ISMPLT422GBANCNFSM5B5ELM4Q . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .
One thing I noticed is that the summary statistics have OR in the headline but the column appears to contain beta estimates. Let me know if the error doesn't resolve after fixing this.
The error was resolved after I changed the column name. Thank you so much for helping me.
Best regards, Bogyeom Kim
2021년 8월 17일 (화) 오후 10:07, Tian Ge @.***>님이 작성:
One thing I noticed is that the summary statistics have OR in the headline but the column appears to contain beta estimates. Let me know if the error doesn't resolve after fixing this.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/getian107/PRScsx/issues/10#issuecomment-900282171, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQD26XAA2ADWJS3YJWGE7MLT5JNJHANCNFSM5B5ELM4Q . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .
Dear Dr. Tian,
I have encountered the following issue while running the PRS-csx:
process chromosome 21
... parse reference file: /work2/07939/tg872382/stampede2/connectome/stampede2/PRScsx/ld_ref/snpinfo_mult_1kg_hm3 ... ... 18073 SNPs on chromosome 21 read from /work2/07939/tg872382/stampede2/connectome/stampede2/PRScsx/ld_ref/snpinfo_mult_1kg_hm3 ... ... parse bim file: /work2/07939/tg872382/stampede2/connectome/stampede2/ABCD_genotype2021/ABCD_QCed_2021_PCair_8620+1579_PRScs/ABCD_QCed_2021_PCair_8620+1579_PRScs_SNPrsid_final.bim ... c506-021skx$ ... 153530 SNPs on chromosome 21 read from /work2/07939/tg872382/stampede2/connectome/stampede2/ABCD_genotype2021/ABCD_QCed_2021_PCair_8620+1579_PRScs/ABCD_QCed_2021_PCair_8620+1579_PRScs_SNPrsid_final.bim ... ... parse EUR sumstats file: /work2/07939/tg872382/stampede2/connectome/stampede2/ABCD_summarystats/PGC_anxiety_forPRScsx.txt ... ... 6330995 SNPs read from /work2/07939/tg872382/stampede2/connectome/stampede2/ABCD_summarystats/PGC_anxiety_forPRScsx.txt ... ... 13875 common SNPs in the EUR reference, EUR sumstats, and validation set ... /opt/apps/intel19/python3/3.7.0/lib/python3.7/site-packages/numpy-1.19.5-py3.7-linux-x86_64.egg/numpy/lib/scimath.py:272: RuntimeWarning: divide by zero encountered in log return nx.log(x) ... parse EUR reference LD on chromosome 21 ... ... align reference LD on chromosome 21 across populations ... ... 13875 valid SNPs across populations ... ... MCMC ... /work2/07939/tg872382/stampede2/connectome/stampede2/PRScsx/mcmc_gtb.py:82: ComplexWarning: Casting complex values to real discards the imaginary part beta[pp][idx_blk] = linalg.solve_triangular(dinvt_chol, beta_tmp, trans='N') Traceback (most recent call last): File "/work2/07939/tg872382/stampede2/connectome/stampede2/PRScsx/PRScsx.py", line 204, in
main()
File "/work2/07939/tg872382/stampede2/connectome/stampede2/PRScsx/PRScsx.py", line 198, in main
param_dict['out_dir'], param_dict['out_name'], param_dict['meta'], param_dict['seed'])
File "/work2/07939/tg872382/stampede2/connectome/stampede2/PRScsx/mcmc_gtb.py", line 87, in mcmc
sigma[pp] = 1.0/random.gamma((n[pp]+p[pp])/2.0, 1.0/err)
File "mtrand.pyx", line 1661, in numpy.random.mtrand.RandomState.gamma
File "_common.pyx", line 529, in numpy.random._common.cont
TypeError: Cannot cast array data from dtype('complex128') to dtype('float64') according to the rule 'safe'
Cannot cast array data from dtype('complex128') to dtype('float64') according to the rule 'safe'^C
[2]+ Exit 1 python3 /work2/07939/tg872382/stampede2/connectome/stampede2/PRScsx/PRScsx.py --ref_dir=/work2/07939/tg872382/stampede2/connectome/stampede2/PRScsx/ld_ref --bim_prefix=/work2/07939/tg872382/stampede2/connectome/stampede2/ABCD_genotype2021/ABCD_QCed_2021_PCair_8620+1579_PRScs/ABCD_QCed_2021_PCair_8620+1579_PRScs_SNPrsid_final --sst_file=/work2/07939/tg872382/stampede2/connectome/stampede2/ABCD_summarystats/PGC_anxiety_forPRScsx.txt --n_gwas=14364 --pop=EUR --chrom=21 --phi=1e-2 --out_dir=/work2/08170/amyk01/stampede2/ABCD_PRScsx/Anxiety/prscsx_output --out_name=ABCD_Anxiety_EUR_csx seed=1234
c506-021skx$ python3 /work2/07939/tg872382/stampede2/connectome/stampede2/PRScsx/PRScsx.py --ref_dir=/work2/07939/tg872382/stampede2/connectome/stampede2/PRScsx/ld_ref --bim_prefix=/work2/07939/tg872382/stampede2/connectome/stampede2/ABCD_genotype2021/ABCD_QCed_2021_PCair_8620+1579_PRScs/ABCD_QCed_2021_PCair_8620+1579_PRScs_SNPrsid_final --sst_file=/work2/07939/tg872382/stampede2/connectome/stampede2/ABCD_summarystats/PGC_anxiety_forPRScsx.txt --n_gwas=14364 --pop=EUR --chrom=22 --phi=1e-4 --out_dir=/wo rk2/08170/amyk01/stampede2/ABCD_PRScsx/Anxiety/prscsx_output --out_name=ABCD_Anxiety_EUR_csx seed=1234 & [1] 367688
First of all, thank you for making this PRS-csx.
Although some other chromosomes and phi were successfully generated, I encountered the above error in some chromosomes.
I'm actively working on PRS-csx in my research team and your answer will be really helpful for me to solve this error.
Thank you so much,
Bogyeom