]> git.donarmstrong.com Git - mothur.git/blobdiff - fileoutput.cpp
added warning about merging with something above cutoff to cluster. working on chimeras
[mothur.git] / fileoutput.cpp
index 004ed8313511c2dd42d4b87aca93c0ad5750bce5..0d78a2db778b22ec0313d56781de192d56f64693 100644 (file)
@@ -81,6 +81,8 @@ void ThreeColumnFile::resetFile(){
                remove(inName.c_str());
                renameOk = rename(outName.c_str(), inName.c_str());
                
+               //renameFile(outName, inName);
+               
                //checks to make sure user was able to rename and remove successfully
                if ((renameOk != 0)) { 
                        mothurOut("Unable to rename " + outName); mothurOutEndLine();
@@ -183,6 +185,8 @@ void ColumnFile::resetFile(){
                remove(inName.c_str());
                renameOk = rename(outName.c_str(), inName.c_str());
                
+               //renameFile(outName, inName);
+               
                //checks to make sure user was able to rename and remove successfully
                if ((renameOk != 0)) { 
                        mothurOut("Unable to rename " + outName); mothurOutEndLine();
@@ -265,9 +269,12 @@ void SharedThreeColumnFile::resetFile(){
                        outFile.close();
                }
                counter = 1;
+               
                remove(inName.c_str());
                renameOk = rename(outName.c_str(), inName.c_str());
                
+               //renameFile(outName, inName);
+               
                //checks to make sure user was able to rename and remove successfully
                if ((renameOk != 0)) { 
                        mothurOut("Unable to rename " + outName); mothurOutEndLine();
@@ -306,7 +313,7 @@ void OneColumnFile::initFile(string label){
                }
                else{
                        openOutputFile(outName, outFile);
-                       outFile << "numsequences\t" << label << endl;
+                       outFile << "numsampled\t" << label << endl;
                }
        
                outFile.setf(ios::fixed, ios::floatfield);
@@ -345,19 +352,22 @@ void OneColumnFile::resetFile(){
                if(counter != 0){
                        outFile.close();
                        inFile.close();
-               }
-               else{
+               }else{
                        outFile.close();
                }       
                counter = 1;
+               
                remove(inName.c_str());
                renameOk = rename(outName.c_str(), inName.c_str());
                
+               //renameFile(outName, inName);
+               
                //checks to make sure user was able to rename and remove successfully
                if ((renameOk != 0)) { 
                        mothurOut("Unable to rename " + outName); mothurOutEndLine();
                        perror(" : ");
                }       
+
        }
        catch(exception& e) {
                errorOut(e, "OneColumnFile", "resetFile");
@@ -445,9 +455,10 @@ void SharedOneColumnFile::resetFile(){
                counter = 1;
 
                remove(inName.c_str());
-
                renameOk = rename(outName.c_str(), inName.c_str());
                
+               //renameFile(outName, inName);
+               
                //checks to make sure user was able to rename and remove successfully
                if ((renameOk != 0)) { 
                        mothurOut("Unable to rename " + outName); mothurOutEndLine();