]> git.donarmstrong.com Git - mothur.git/blobdiff - raredisplay.cpp
line and label no longer persist between commands. Added phylip formated output...
[mothur.git] / raredisplay.cpp
index 983ed102adc08f5629e061013b9d19c1fa49a28a..61362c78515b1ebaf3e0b006782960bfb33ebb91 100644 (file)
@@ -15,6 +15,7 @@ void RareDisplay::init(string label){
        try {
                this->label = label;
                if(nIters != 1){
+                       tempInFile.clear();
                        openOutputFile(tempOutName, tempOutFile);
                        openInputFile(tempInName, tempInFile);
                }
@@ -65,12 +66,12 @@ void RareDisplay::update(SAbundVector* rank){
                cout << "An unknown error has occurred in the RareDisplay class function update. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
                exit(1);
        }
-};
+}
 
 /***********************************************************************/
-void RareDisplay::update(SharedRAbundVector* shared1, SharedRAbundVector* shared2, int numSeqs, int numGroupComb) {
+void RareDisplay::update(vector<SharedRAbundVector*> shared, int numSeqs, int numGroupComb) {
        try {
-               vector<double> data = estimate->getValues(shared1, shared2); 
+               vector<double> data = estimate->getValues(shared); 
                double newNSeqs = data[0];
                
                if(nIters != 1){
@@ -98,7 +99,7 @@ void RareDisplay::update(SharedRAbundVector* shared1, SharedRAbundVector* shared
                cout << "An unknown error has occurred in the RareDisplay class function update. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
                exit(1);
        }
-};
+}
 
 /***********************************************************************/
 
@@ -134,6 +135,7 @@ void RareDisplay::reset(){
 
 void RareDisplay::close(){
        try {
+               
                output->initFile(label);
        
                openInputFile(tempInName, tempInFile);