statgen / METAL

Meta-analysis of genomewide association scans
Other
44 stars 12 forks source link

Complaints over gcf #24

Open jinghuazhao opened 2 years ago

jinghuazhao commented 2 years ago

I appeared to come across a fixable issue to do with the Numerical Recipes routine. My log says

FATAL ERROR - a too large, ITMAX too small in gamma countinued fraction (gcf)

so the -1.info file could not be generated.

I replaced several routines in MathStats.cpp with those from the web, http://numerical.recipes/forum/attachment.php?attachmentid=60&d=1190409664 (I suspect its gamp should have been gammp), and the error went away.

Otherwise, I have also seen a cleaner one here, http://www.if.ufrj.br/~bertu/incomplete_gamma.cpp, but didn't experiment with it.

shugamoe commented 1 year ago

Just to confirm, this error will not cut off the writing of the result *.txt file, right?

I think with VERBOSE ON it prevents the writing of both the .txt and .info files, but without VERBOSE it seems to write the same number of lines every time to the .txt file so I think it shouldn't cut off the .txt writing, but that number seems smaller then what I expect.

shugamoe commented 1 year ago

It seems I was reaching this error by not using METAL to log the OR column, so no worries on my part. Thank you for your continued work on this!

jinghuazhao commented 1 year ago

I just got to see notification from GitHub. It has been a while but I could replicate the error and the .tbl file is only partially generated (230M ~ 1.3GB in our data). The METAL script I used is copied here.

SEPARATOR TAB COLUMNCOUNTING STRICT CHROMOSOMELABEL CHR POSITIONLABEL POS CUSTOMVARIABLE N LABEL N as N TRACKPOSITIONS ON AVERAGEFREQ ON MINMAXFREQ ON ADDFILTER AF1 >= 0.01 ADDFILTER AF1 <= 0.99 MARKERLABEL SNP ALLELELABELS A1 A2 EFFECTLABEL BETA PVALUELABEL P WEIGHTLABEL N FREQLABEL AF1 STDERRLABEL SE SCHEME STDERR EFFECT_PRINT_PRECISION 8 STDERR_PRINT_PRECISION 8 GENOMICCONTROL OFF LOGPVALUE ON OUTFILE BROX- .tbl PROCESS 1-BROX.fastGWA.gz PROCESS 2-BROX.fastGWA.gz PROCESS 3-BROX.fastGWA.gz ANALYZE HETEROGENEITY CLEAR

xingejun commented 1 year ago

Hi,

I appeared to come across a fixable issue to do with the Numerical Recipes routine. My log says

FATAL ERROR - a too large, ITMAX too small in gamma countinued fraction (gcf)

so the -1.info file could not be generated.

I replaced several routines in MathStats.cpp with those from the web, http://numerical.recipes/forum/attachment.php?attachmentid=60&d=1190409664 (I suspect its gamp should have been gammp), and the error went away.

Otherwise, I have also seen a cleaner one here, http://www.if.ufrj.br/~bertu/incomplete_gamma.cpp, but didn't experiment with it.

Hi, jinghua

I met this error these days, too. Could you mind helping me to solve it. For example, could you mind share your MathStats.cpp code file with me? Sorry, I could not very understand how to replace routine code because I seldom used C.

Thank you very much.

Xinger

jinghuazhao commented 1 year ago

Hi Xinger,

I am short of making a pull-request for METAL since I have made a revised direction field in our meta-analysis which may cause confusion to others. A trade-off is to make the MathStats.cpp separately as suggested,

The copy can be found here, https://github.com/jinghuazhao/tests; I suppose you would need click METAL/, then MathStats.cpp, and Raw to have the source.

Please let me know if you see anything odd,

Jing Hua