JonJala / mtag

Python command line tool for Multi-Trait Analysis of GWAS (MTAG)
GNU General Public License v3.0
169 stars 54 forks source link

FloatingPointError: divide by zero encountered in true_divide #105

Open yabwei opened 4 years ago

yabwei commented 4 years ago

Hi, The mtag runs pretty good all the time but it showed an error today when I was mtagging 2 gwas summary data (see log below). The 2 dataset has no problem when mtagging separately with other gwas summary data, meaning this is not due to data format issue etc. Could you provide any solutions ? Thanks so much.

2020/08/14/05:54:35 PM Beginning MTAG calculations... 2020/08/14/05:55:54 PM ... Completed MTAG calculations. 2020/08/14/05:55:54 PM Writing Phenotype 1 to file ... 2020/08/14/05:57:09 PM Writing Phenotype 2 to file ... 2020/08/14/05:57:11 PM divide by zero encountered in true_divide Traceback (most recent call last): File "/home/disk3/weiyabin/tool/mtag/mtag.py", line 1567, in mtag(args) File "/home/disk3/weiyabin/tool/mtag/mtag.py", line 1451, in mtag save_mtag_results(args, res_temp, Zs, N_raw, Fs, mtag_betas, mtag_se, mtag_factor) File "/home/disk3/weiyabin/tool/mtag/mtag.py", line 871, in save_mtag_results out_df['mtag_beta'] = mtag_betas[:,p] / weights FloatingPointError: divide by zero encountered in true_divide 2020/08/14/05:57:11 PM Analysis terminated from error at Fri Aug 14 17:57:11 2020 2020/08/14/05:57:11 PM Total time elapsed: 13.0m:30.48s

paturley commented 4 years ago

Could you attach the full log file, please? It works make it a bit simpler to diagnose what's going on.

On Fri, Aug 14, 2020, 7:50 AM yabwei notifications@github.com wrote:

Hi, The mtag runs pretty good all the time but it showed an error today when I was mtagging 2 gwas summary data (see log below). The 2 dataset has no problem when mtagging separately with other gwas summary data, meaning this is not due to data format issue etc. Could you provide any solutions ? Thanks so much.

2020/08/14/05:54:35 PM Beginning MTAG calculations... 2020/08/14/05:55:54 PM ... Completed MTAG calculations. 2020/08/14/05:55:54 PM Writing Phenotype 1 to file ... 2020/08/14/05:57:09 PM Writing Phenotype 2 to file ... 2020/08/14/05:57:11 PM divide by zero encountered in true_divide Traceback (most recent call last): File "/home/disk3/weiyabin/tool/mtag/mtag.py", line 1567, in mtag(args) File "/home/disk3/weiyabin/tool/mtag/mtag.py", line 1451, in mtag save_mtag_results(args, res_temp, Zs, N_raw, Fs, mtag_betas, mtag_se, mtag_factor) File "/home/disk3/weiyabin/tool/mtag/mtag.py", line 871, in save_mtag_results out_df['mtag_beta'] = mtag_betas[:,p] / weights FloatingPointError: divide by zero encountered in true_divide 2020/08/14/05:57:11 PM Analysis terminated from error at Fri Aug 14 17:57:11 2020 2020/08/14/05:57:11 PM Total time elapsed: 13.0m:30.48s

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/JonJala/mtag/issues/105, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFBUB5MISAPQ5DYML7W6T3LSAUQHPANCNFSM4P7NN47Q .

yabwei commented 4 years ago

Hi, I think I just found the answer in issue#32. He met the same problem. The key is to filter allele freq <1. One of my gwas summary data got a number of snps don't meet this. But the strange thing is that this dataset is ok to mtag with several other datasets.

I am really sorry my new run just overwrite the old log, which runs successfully now ! 🙂

Maybe you could highlight this freq filter criteria in the tutorial ?

Thanks again. Best, Yabin


From: paturley notifications@github.com Sent: Friday, August 14, 2020 8:14 PM To: JonJala/mtag mtag@noreply.github.com Cc: yabwei yabin.wei@hotmail.com; Author author@noreply.github.com Subject: Re: [JonJala/mtag] FloatingPointError: divide by zero encountered in true_divide (#105)

Could you attach the full log file, please? It works make it a bit simpler to diagnose what's going on.

On Fri, Aug 14, 2020, 7:50 AM yabwei notifications@github.com wrote:

Hi, The mtag runs pretty good all the time but it showed an error today when I was mtagging 2 gwas summary data (see log below). The 2 dataset has no problem when mtagging separately with other gwas summary data, meaning this is not due to data format issue etc. Could you provide any solutions ? Thanks so much.

2020/08/14/05:54:35 PM Beginning MTAG calculations... 2020/08/14/05:55:54 PM ... Completed MTAG calculations. 2020/08/14/05:55:54 PM Writing Phenotype 1 to file ... 2020/08/14/05:57:09 PM Writing Phenotype 2 to file ... 2020/08/14/05:57:11 PM divide by zero encountered in true_divide Traceback (most recent call last): File "/home/disk3/weiyabin/tool/mtag/mtag.py", line 1567, in mtag(args) File "/home/disk3/weiyabin/tool/mtag/mtag.py", line 1451, in mtag save_mtag_results(args, res_temp, Zs, N_raw, Fs, mtag_betas, mtag_se, mtag_factor) File "/home/disk3/weiyabin/tool/mtag/mtag.py", line 871, in save_mtag_results out_df['mtag_beta'] = mtag_betas[:,p] / weights FloatingPointError: divide by zero encountered in true_divide 2020/08/14/05:57:11 PM Analysis terminated from error at Fri Aug 14 17:57:11 2020 2020/08/14/05:57:11 PM Total time elapsed: 13.0m:30.48s

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/JonJala/mtag/issues/105, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFBUB5MISAPQ5DYML7W6T3LSAUQHPANCNFSM4P7NN47Q .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/JonJala/mtag/issues/105#issuecomment-674045123, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AQTQSDY2ZDYWV7WR3DBIEH3SAUTBFANCNFSM4P7NN47Q.

paturley commented 4 years ago

Ah. It probably makes the most sense to just change the code to filter those variants out. We'll make an update to the software and push that today.

On Fri, Aug 14, 2020 at 9:10 AM yabwei notifications@github.com wrote:

Hi, I think I just found the answer in issue#32. He met the same problem. The key is to filter allele freq <1. One of my gwas summary data got a number of snps don't meet this. But the strange thing is that this dataset is ok to mtag with several other datasets.

I am really sorry my new run just overwrite the old log, which runs successfully now ! 🙂

Maybe you could highlight this freq filter criteria in the tutorial ?

Thanks again. Best, Yabin


From: paturley notifications@github.com Sent: Friday, August 14, 2020 8:14 PM To: JonJala/mtag mtag@noreply.github.com Cc: yabwei yabin.wei@hotmail.com; Author author@noreply.github.com Subject: Re: [JonJala/mtag] FloatingPointError: divide by zero encountered in true_divide (#105)

Could you attach the full log file, please? It works make it a bit simpler to diagnose what's going on.

On Fri, Aug 14, 2020, 7:50 AM yabwei notifications@github.com wrote:

Hi, The mtag runs pretty good all the time but it showed an error today when I was mtagging 2 gwas summary data (see log below). The 2 dataset has no problem when mtagging separately with other gwas summary data, meaning this is not due to data format issue etc. Could you provide any solutions ? Thanks so much.

2020/08/14/05:54:35 PM Beginning MTAG calculations... 2020/08/14/05:55:54 PM ... Completed MTAG calculations. 2020/08/14/05:55:54 PM Writing Phenotype 1 to file ... 2020/08/14/05:57:09 PM Writing Phenotype 2 to file ... 2020/08/14/05:57:11 PM divide by zero encountered in true_divide Traceback (most recent call last): File "/home/disk3/weiyabin/tool/mtag/mtag.py", line 1567, in mtag(args) File "/home/disk3/weiyabin/tool/mtag/mtag.py", line 1451, in mtag save_mtag_results(args, res_temp, Zs, N_raw, Fs, mtag_betas, mtag_se, mtag_factor) File "/home/disk3/weiyabin/tool/mtag/mtag.py", line 871, in save_mtag_results out_df['mtag_beta'] = mtag_betas[:,p] / weights FloatingPointError: divide by zero encountered in true_divide 2020/08/14/05:57:11 PM Analysis terminated from error at Fri Aug 14 17:57:11 2020 2020/08/14/05:57:11 PM Total time elapsed: 13.0m:30.48s

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/JonJala/mtag/issues/105, or unsubscribe < https://github.com/notifications/unsubscribe-auth/AFBUB5MISAPQ5DYML7W6T3LSAUQHPANCNFSM4P7NN47Q>

.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub< https://github.com/JonJala/mtag/issues/105#issuecomment-674045123>, or unsubscribe< https://github.com/notifications/unsubscribe-auth/AQTQSDY2ZDYWV7WR3DBIEH3SAUTBFANCNFSM4P7NN47Q>.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/JonJala/mtag/issues/105#issuecomment-674066924, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFBUB5JGN6XK6WKC65LQ3RDSAUZVDANCNFSM4P7NN47Q .