X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=npshannon.cpp;h=a855b316964da97dd261f33ee094f014a4ed7b05;hp=4ff26110d20ee42914d9bfb20a0b523a945f4216;hb=df7e3ff9f68ef157b0328a2d353c3258c5d45d89;hpb=20a2d0350a737a434c89f303662d64a8eeea7b05 diff --git a/npshannon.cpp b/npshannon.cpp index 4ff2611..a855b31 100644 --- a/npshannon.cpp +++ b/npshannon.cpp @@ -3,7 +3,7 @@ * Dotur * * Created by John Westcott on 1/7/09. - * Copyright 2009 __MyCompanyName__. All rights reserved. + * Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved. * */ @@ -18,7 +18,7 @@ EstOutput NPShannon::getValues(SAbundVector* rank){ float npShannon = 0.0000; double maxRank = (double)rank->getMaxRank(); - int sampled = rank->getNumSeqs(); + double sampled = rank->getNumSeqs(); double Chat = 1.0000 - (double)rank->get(1)/(double)sampled; @@ -43,13 +43,9 @@ EstOutput NPShannon::getValues(SAbundVector* rank){ return data; } catch(exception& e) { - cout << "Standard Error: " << e.what() << " has occurred in the NPShannon class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + m->errorOut(e, "NPShannon", "getValues"); exit(1); } - catch(...) { - cout << "An unknown error has occurred in the NPShannon class function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; - exit(1); - } } /***********************************************************************/