Skip to content

Commit

Permalink
Fix for a rare overflow. [Found by @ipiras]
Browse files Browse the repository at this point in the history
  • Loading branch information
andreyshabalin committed May 9, 2022
1 parent 681b367 commit 7e5c1cb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions R/Matrix_eQTL_engine.R
Original file line number Diff line number Diff line change
Expand Up @@ -1586,6 +1586,7 @@ Matrix_eQTL_main = function(
threshfun = function(pv){
thr = qt(pv/2, dfFull, lower.tail = FALSE);
thr = thr^2;
thr[is.infinite(thr)] = .Machine$double.xmax;
thr = sqrt( thr / (dfFull + thr) );
thr[pv >= 1] = 0;
thr[pv <= 0] = 1;
Expand Down

0 comments on commit 7e5c1cb

Please sign in to comment.