X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=mothurfisher.cpp;h=7acefb2087533546b6089afb984005ec8db64d45;hp=6f705b979f8ba0cc41b5ceead966dc7b0cf7a918;hb=6b32d112bb60e9f7eb6d4407a4eed4c49b67bced;hpb=783b9ef8e739307aed392f35970701f6b53390fb diff --git a/mothurfisher.cpp b/mothurfisher.cpp index 6f705b9..7acefb2 100644 --- a/mothurfisher.cpp +++ b/mothurfisher.cpp @@ -90,11 +90,12 @@ double MothurFisher::hyper_323(double n11, double n1_, double n_1, double n){ } } /***********************************************************/ -double MothurFisher::hyper(double n11){ +double MothurFisher::myhyper(double n11){ try { - return(hyper0(n11,0,0,0)); + double hyper0Result = hyper0(n11,0,0,0); + return hyper0Result; }catch(exception& e) { - m->errorOut(e, "MothurFisher", "hyper"); + m->errorOut(e, "MothurFisher", "myhyper"); exit(1); } } @@ -150,21 +151,21 @@ double MothurFisher::exact(double n11, double n1_, double n_1, double n){ } prob=hyper0(n11,n1_,n_1,n); sleft=0; - p=hyper(min); + p=myhyper(min); for(i=min+1; p<0.99999999*prob; i++) { sleft += p; - p=hyper(i); + p=myhyper(i); } i--; if(p<1.00000001*prob) sleft += p; else i--; sright=0; - p=hyper(max); + p=myhyper(max); for(j=max-1; p<0.99999999*prob; j--) { sright += p; - p=hyper(j); + p=myhyper(j); } j++; if(p<1.00000001*prob) sright += p; @@ -182,7 +183,7 @@ double MothurFisher::exact(double n11, double n1_, double n_1, double n){ return prob; }catch(exception& e) { - m->errorOut(e, "MothurFisher", "hyper0"); + m->errorOut(e, "MothurFisher", "exact"); exit(1); } }