X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=mothurfisher.cpp;h=7acefb2087533546b6089afb984005ec8db64d45;hb=a0f1fca79d2ddfa7ad36b4485039c68b5704fe8d;hp=8cf332b54d0364e1c84084b6f4a599d500ea2681;hpb=19fcbbdba99658f5eca244803280f9ee7f9f6607;p=mothur.git diff --git a/mothurfisher.cpp b/mothurfisher.cpp index 8cf332b..7acefb2 100644 --- a/mothurfisher.cpp +++ b/mothurfisher.cpp @@ -90,12 +90,12 @@ double MothurFisher::hyper_323(double n11, double n1_, double n_1, double n){ } } /***********************************************************/ -//var sn11,sn1_,sn_1,sn,sprob; -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); } } @@ -151,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; @@ -183,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); } }