X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=bstick.cpp;h=67507a9967ef82effe923662298960ecf00618b8;hp=c3ff58fc7a12dbe5c7650acc3a095ee6c4cf3111;hb=050a3ff02473a3d4c0980964e1a9ebe52e55d6b8;hpb=c196b6b4768ccb84955d773ff0f22e4994d1ba7b diff --git a/bstick.cpp b/bstick.cpp index c3ff58f..67507a9 100644 --- a/bstick.cpp +++ b/bstick.cpp @@ -18,7 +18,7 @@ double BStick::invSum(int index, double numSpec) sum += 1/(double)i; return sum; } - +/***********************************************************************/ RAbundVector BStick::getRAbundVector(SAbundVector* rank){ vector rData; int mr = 1; @@ -26,7 +26,7 @@ RAbundVector BStick::getRAbundVector(SAbundVector* rank){ int ns = 0; for(int i = rank->size()-1; i > 0; i--) { - int cur = rank->get(i); + double cur = rank->get(i); if(mr == 1 && cur > 0) mr = i; nb += cur; @@ -67,8 +67,8 @@ EstOutput BStick::getValues(SAbundVector* rank){ data[1] = 0.886/sqrt(rdata.size()); data[2] = 1.031/sqrt(rdata.size()); - /*cout << critVal << "\n"; - cout << "If D-Statistic is less than the critical value then the data fits the Broken Stick model w/ 95% confidence.\n\n";*/ + /*m->mothurOut(critVal); m->mothurOutEndLine(); + m->mothurOut("If D-Statistic is less than the critical value then the data fits the Broken Stick model w/ 95% confidence.\n");*/ if (isnan(data[0]) || isinf(data[0])) { data[0] = 0; } @@ -78,13 +78,9 @@ EstOutput BStick::getValues(SAbundVector* rank){ return data; } catch(exception& e) { - cout << "Standard Error: " << e.what() << " has occurred in the BStick class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + m->errorOut(e, "BStick", "getValues"); exit(1); } - catch(...) { - cout << "An unknown error has occurred in the BStick class function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; - exit(1); - } } /***********************************************************************/