xqwen / integrative

Software Pipeline for Integrative Genetic Association Analysis: Probabilistic Assessment of Enrichment and Colocalization
24 stars 7 forks source link

Failed enloc run on my dataset "Illegal division by zero..." #4

Open ruthchia opened 7 years ago

ruthchia commented 7 years ago

Hi William, I ran enloc on my dataset and had an error message " Illegal division by zero..." Snapshot or error message in below: image

I know that enloc is installed correctly because of the several datasets that I have, a few was completed and a few failed. Can you please help me figure out the root for this error?

Briefly, I've subsetted by GWAS data according to chr, and the subset only contains 500 SNPs flanking my top SNP in the loci of interest. Would this be a problem for enloc?

Thanks Ruth

xqwen commented 7 years ago

I am sorry that I completely missed this thread. But in principle, genome-wide data should be run together. Separate running on each genome segment would defy the purpose of information pooling.

But this shows we need to define an upper bound of penalty, instead of allowing inf. Will change the code.

wwgordon commented 6 years ago

Hi William,

I've also been running in to this issue, with the most recent code. Do you know of any workarounds?

xqwen commented 6 years ago

Can you be a little more specific about the problem? i.e. Does it always occur or just happens by chance? It would be also helpful to check the intermediate output files. Specifically, check

  1. check the output pheno.enrich.out, where pheno is your phenotype name
  2. if directory gwas_signals is empty
  3. check the files in qtl_pip

These will help us to determine the stage where the problem occured.

Thanks!

chj1ar commented 5 years ago

Hi William,

I encountered this issue even when running the examples. To be specific, I prepared the workspace/ folder as suggested, and ran the command ./bin/enloc HDL_blood.enloc.params

Below are the outputs (the last line indicates the error).


Start enrichment analysis
Impute eQTL data ...
Killed
Killed
Killed
Killed
Killed
Killed
Killed
Killed
Killed
Killed
Killed
Killed
Killed
Killed
Killed
Killed
Killed
Killed
Killed
Killed
Killed
Perform enrichment analysis by multiple imputation ... 
Killed
Killed
Killed
Killed
Killed
Killed
Killed
Killed
Killed
Killed
Killed
Killed
Killed
Killed
Killed
Killed
Killed
Killed
Killed
Killed
Killed
Killed
Read in 1700 loci, 6127680 locus-SNP pairs ... 
Loading annotations ... 
Read in 1700 loci, 6127680 locus-SNP pairs ... 
Loading annotations ... 
Killed
Read in 1700 loci, 6127680 locus-SNP pairs ... 
Loading annotations ... 
Killed
Initializing ... 
Starting EM ... 
Applying adaptive L2 penalty = 0.628

  Iter          loglik          Intercept    annot.1    
   1         -1691.244           -8.537      0.385  
   2          1754.912           -9.208      0.807  
   3          1999.852           -9.601      1.262  
   4          2055.000           -9.845      1.750  
   5          2072.175          -10.000      2.261  
   6          2079.071          -10.100      2.760  
   7          2082.963          -10.168      3.213  
   8          2085.898          -10.215      3.597  
   9          2088.341          -10.250      3.911  
  10          2090.343          -10.277      4.161  
  11          2091.915          -10.298      4.357  
  12          2093.103          -10.315      4.509  
  13          2093.978          -10.329      4.627  
  14          2094.611          -10.340      4.718  
  15          2095.066          -10.349      4.788  
  16          2095.392          -10.356      4.842  
  17          2095.628          -10.361      4.884  
  18          2095.798          -10.366      4.915  
  19          2095.923          -10.369      4.940  
  20          2096.014          -10.372      4.959  
Illegal division by zero at ./bin/enloc line 470, <FILE> line 1.

I failed to find HDL.enrich.out, gwas_signals, qtl_pip in the workspace/ folder, but I have checked less HDL_blood/mi_est/*.est, all of which are empty except one file ./HDL_blood/mi_est/HDL.mi.12.est, which has the following content.


                Intercept    -10.372       -10.395    -10.348
                  annot.1      4.959         3.392      6.525

Where should the error be? Thank you very much William. Jiarun

chj1ar commented 5 years ago

Hi William,

I have run your Enloc on schizophrenia GWAS data with the example gtex_whole_blood.v6.tgz. Please find the workspace folder in my Google Drive. I simply ran ./bin/enloc SCZ_blood.enloc.params under the workspace folder as you had suggested. And the output was as follows. (The last line indicates the error)

Start enrichment analysis
Impute eQTL data ...
Killed
Killed
Killed
Killed
Killed
Killed
Killed
Killed
Killed
Killed
Killed
Killed
Killed
Killed
Killed
Killed
Killed
Killed
Killed
Killed
Killed
Perform enrichment analysis by multiple imputation ... 
Killed
Killed
Killed
Killed
Killed
Killed
Killed
Killed
Killed
Killed
Killed
Killed
Killed
Killed
Killed
Killed
Killed
Killed
Killed
Killed
Killed
Killed
Read in 1702 loci, 8286510 locus-SNP pairs ... 
Loading annotations ... 
Killed
Read in 1702 loci, 8286510 locus-SNP pairs ... 
Loading annotations ... 
Read in 1702 loci, 8286510 locus-SNP pairs ... 
Loading annotations ... 
Killed
Initializing ... 
Starting EM ... 
Applying adaptive L2 penalty = 0.788

  Iter          loglik          Intercept    annot.1    
   1         -2974.383           -8.638      0.264  
   2          1659.174           -9.005      0.473  
   3          1758.203           -9.126      0.641  
   4          1767.504           -9.169      0.785  
   5          1768.721           -9.185      0.914  
   6          1768.986           -9.191      1.034  
   7          1769.133           -9.193      1.150  
   8          1769.271           -9.194      1.264  
   9          1769.418           -9.195      1.377  
  10          1769.577           -9.195      1.491  
  11          1769.753           -9.196      1.607  
  12          1769.947           -9.196      1.725  
  13          1770.162           -9.197      1.845  
  14          1770.398           -9.197      1.967  
  15          1770.657           -9.198      2.089  
  16          1770.937           -9.199      2.210  
  17          1771.236           -9.199      2.330  
  18          1771.549           -9.200      2.446  
  19          1771.870           -9.201      2.557  
  20          1772.193           -9.202      2.662  
  21          1772.509           -9.203      2.759  
  22          1772.812           -9.204      2.849  
  23          1773.097           -9.205      2.931  
  24          1773.359           -9.207      3.004  
  25          1773.596           -9.208      3.069  
  26          1773.806           -9.208      3.127  
  27          1773.991           -9.209      3.177  
  28          1774.152           -9.210      3.221  
  29          1774.290           -9.211      3.259  
  30          1774.408           -9.211      3.291  
  31          1774.508           -9.212      3.319  
Illegal division by zero at ./bin/enloc line 470, <FILE> line 1.

Could you reproduce the error? And where should the error be and how might I solve the problem? Thank you very much William. Jiarun

xqwen commented 5 years ago

I am not completely certain on the issue. But it seems that you are running enloc in an environment that restricts the usage of multiple CPUs/threads. I suggest you change the use_openmp option in the parameter file to 0 and re-run your analysis.

Let me know if it solves the problem.

William