]> git.donarmstrong.com Git - mothur.git/blobdiff - qstat.cpp
added modify names parameter to set.dir
[mothur.git] / qstat.cpp
index ed4471a8d18b983294bd3824832d093316fe40fa..e07cdb3fb860b96a17ba2972474f0abb8bf05d7e 100644 (file)
--- a/qstat.cpp
+++ b/qstat.cpp
@@ -31,8 +31,8 @@ EstOutput QStat::getValues(SAbundVector* rank){
                int r3 = -1;
                int r1Ind = 0;
                int r3Ind = 0;
-               int sumSpec = 0;
-               int iqSum = 0;
+               double sumSpec = 0;
+               double iqSum = 0;
                for(int i = 1; i < rank->size(); i++) {
                        if(r1 != -1 && r3 != -1)
                                i = rank->size();
@@ -52,7 +52,6 @@ EstOutput QStat::getValues(SAbundVector* rank){
                }
                
                double qstat = (.5*r1 + iqSum + .5*r3)/log((double)r3Ind/r1Ind);
-               //cout << "QStat:\nQStatistic = " << qstat << "\n\n";
                
                data[0] = qstat;
                if (isnan(data[0]) || isinf(data[0])) { data[0] = 0; }
@@ -60,13 +59,9 @@ EstOutput QStat::getValues(SAbundVector* rank){
                return data;
        }
        catch(exception& e) {
-               cout << "Standard Error: " << e.what() << " has occurred in the QStat class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+               m->errorOut(e, "QStat", "getValues");
                exit(1);
        }
-       catch(...) {
-               cout << "An unknown error has occurred in the QStat class function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
-               exit(1);
-       }       
 }
 
 /***********************************************************************/