]> git.donarmstrong.com Git - mothur.git/blobdiff - slibshuff.cpp
sffinfo bug with flow grams right index when clipQualRight=0
[mothur.git] / slibshuff.cpp
index a9710ded9303b2f93373216bf2d22ba3c81c527c..92998e66ac1eadb442b5b0afc0cfee33835f902a 100644 (file)
@@ -24,7 +24,6 @@ float SLibshuff::evaluatePair(int i, int j){
 vector<vector<double> > SLibshuff::evaluateAll(){
        try{
                savedMins.resize(numGroups);
-               
                vector<vector<double> > dCXYValues(numGroups);
 
                for(int i=0;i<numGroups;i++){
@@ -45,27 +44,33 @@ vector<vector<double> > SLibshuff::evaluateAll(){
                return dCXYValues;
        }
        catch(exception& e) {
-               cout << "Standard Error: " << e.what() << " has occurred in the SLibshuff class Function evaluateAll. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+               m->errorOut(e, "SLibshuff", "evaluateAll");
                exit(1);
        }
-       catch(...) {
-               cout << "An unknown error has occurred in the SLibshuff class function evaluateAll. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
-               exit(1);
-       }       
-       
 }
 
 /***********************************************************************/
 
 double SLibshuff::sCalculate(int x, int y){
        try{
+               double sum = 0.0,t=0.0;
+               
                minX = getMinX(x);
+               
+               if (m->control_pressed) { return sum; }
+               
                minXY = getMinXY(x,y);
+               
+               if (m->control_pressed) { return sum; }
 
                sort(minX.begin(), minX.end());
+               
+               if (m->control_pressed) { return sum; }
+               
                sort(minXY.begin(), minXY.end());
+               
+               if (m->control_pressed) { return sum; }
 
-               double sum = 0.0,t=0.0;
                int ix=0,iy=0;
                while( (ix < groupSizes[x]) && (iy < groupSizes[x]) ) {
                        double h = (ix-iy)/double(groupSizes[x]);
@@ -103,14 +108,9 @@ double SLibshuff::sCalculate(int x, int y){
                return sum;
        }
        catch(exception& e) {
-               cout << "Standard Error: " << e.what() << " has occurred in the SLibshuff class Function sCalculate. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+               m->errorOut(e, "SLibshuff", "sCalculate");
                exit(1);
        }
-       catch(...) {
-               cout << "An unknown error has occurred in the SLibshuff class function sCalculate. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
-               exit(1);
-       }       
-       
 }
 
 /***********************************************************************/