]> git.donarmstrong.com Git - mothur.git/blobdiff - collect.cpp
added list parameter to get.seqs and remove.seqs and added readline library for inter...
[mothur.git] / collect.cpp
index ee46ef5928d8be156af4e1875304b633539e5147..34191a07a324fb255120b02bfabba4b56c9d0c48 100644 (file)
@@ -46,16 +46,15 @@ void Collect::getCurve(int increment = 1){
                 for(int i=0;i<displays.size();i++){
                         displays[i]->reset();
                 }
+                               
+                               delete lookup;
+                               delete rank;
+                               delete ccd;
         }
         catch(exception& e) {
-                cout << "Standard Error: " << e.what() << " has occurred in the Collect class Function getCurve. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
-                exit(1);
-        }
-        catch(...) {
-                cout << "An unknown error has occurred in the Collect class function getCurve. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
-                exit(1);
+                       errorOut(e, "Collect", "getCurve");
+                       exit(1);
         }
-
 }
 
 /***********************************************************************/
@@ -89,7 +88,7 @@ try {
                                
                 for(int i=0;i<displays.size();i++){
                         ccd->registerDisplay(displays[i]); //adds a display[i] to cdd
-                                               if (displays[i]->isCalcMultiple() == true)  {   displays[i]->init(groupLabelAll); }
+                                               if ((displays[i]->isCalcMultiple() == true) && (displays[i]->getAll() == true)) {   displays[i]->init(groupLabelAll); }
                                                else {  displays[i]->init(groupLabel);  }           
                 }
                 
@@ -107,7 +106,6 @@ try {
                                                                break;
                                                        }
                         }
-                        
        
                         //calculate at 0 and the given increment
                         if((i == 0) || (i+1) % increment == 0){
@@ -130,7 +128,7 @@ try {
                         totalNumSeq = i+1;
                 }
                 
-                //calculate last line if you haven't already
+                //calculate last label if you haven't already
                 if(numSeqs % increment != 0){
                         //how many comparisons to make i.e. for group a, b, c = ab, ac, bc.
                         int n = 1;
@@ -151,16 +149,18 @@ try {
                 for(int i=0;i<displays.size();i++){
                         displays[i]->reset();
                 }
+                               
+                               //memory cleanup
+                               delete ccd;
+                               for (int i = 0; i < lookup.size(); i++) {
+                                       delete lookup[i];
+                               }
+
         }
         catch(exception& e) {
-                cout << "Standard Error: " << e.what() << " has occurred in the Collect class Function getSharedCurve. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
-                exit(1);
-        }
-        catch(...) {
-                cout << "An unknown error has occurred in the Collect class function getSharedCurve. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
-                exit(1);
+                errorOut(e, "Collect", "getSharedCurve");
+                               exit(1);
         }
-
 }
 
 /**************************************************************************************/
@@ -182,4 +182,4 @@ void Collect::getGroupComb() {
 
 }
 
-/**************************************************************************************/
\ No newline at end of file
+/**************************************************************************************/