]> git.donarmstrong.com Git - mothur.git/blobdiff - distancecommand.cpp
changed confidence scores calculation in bayesian
[mothur.git] / distancecommand.cpp
index 10a99dd240ee862884d59b8570581ebbe129ef32..ec32ffeb9e2e28b7398f78c5dd5fd858de2326a0 100644 (file)
@@ -278,8 +278,7 @@ int DistanceCommand::execute(){
                                        delete buf;
 
                                        int count = 0;
-                                       while (count < fileSize) { //read 1000 characters at a time
-                                               //send freqs
+                                       while (count < fileSize) { 
                                                char buf2[1];
                                                MPI_File_read(inMPI, buf2, 1, MPI_CHAR, &status);
                                                MPI_File_write(outMPI, buf2, 1, MPI_CHAR, &status);
@@ -343,6 +342,14 @@ int DistanceCommand::execute(){
                
                if (output == "square") {  convertMatrix(outputFile); }
                
+               ifstream fileHandle;
+               fileHandle.open(outputFile.c_str());
+               if(fileHandle) {
+                       gobble(fileHandle);
+                       if (fileHandle.eof()) { m->mothurOut(outputFile + " is blank. This can result if there are no distances below your cutoff.");  m->mothurOutEndLine(); }
+               }
+
+               
                #ifdef USE_MPI
                        }
                #endif