]> git.donarmstrong.com Git - mothur.git/commitdiff
1.22.0
authorwestcott <westcott>
Tue, 18 Oct 2011 18:24:23 +0000 (18:24 +0000)
committerwestcott <westcott>
Tue, 18 Oct 2011 18:24:23 +0000 (18:24 +0000)
classify.cpp
distancecommand.cpp

index eb0865c2744acfe120505a5a533cd482af8b9b19..25aa2dd7b9f2f8a4f36030eebf0d3284f7d28b08 100644 (file)
@@ -123,7 +123,7 @@ void Classify::generateDatabaseAndNames(string tfile, string tempFile, string me
                                //create database
                                if(method == "kmer")                    {       database = new KmerDB(tempFile, kmerSize);                      }
                                else if(method == "suffix")             {       database = new SuffixDB(numSeqs);                                                               }
-                               else if(method == "blast")              {       database = new BlastDB(tempFile.substr(0,tempFile.find_last_of(".")+1), gapOpen, gapExtend, match, misMatch, "");       }
+                               else if(method == "blast")              {       database = new BlastDB(tempFile.substr(0,tempFile.find_last_of(".")+1), gapOpen, gapExtend, match, misMatch, "", pid);  }
                                else if(method == "distance")   {       database = new DistanceDB();    }
                                else {
                                        m->mothurOut(method + " is not a valid search option. I will run the command using kmer, ksize=8."); m->mothurOutEndLine();
index beea1bf915fccffa6b1f92e212e8125db6010af9..0f067aeab3b6ce1a50ba5e60870b410bbf72ba67 100644 (file)
@@ -289,11 +289,11 @@ int DistanceCommand::execute(){
                                
                                driverMPI(start, end, outMPI, cutoff); 
                                
-                               if (m->control_pressed) { outputTypes.clear(); MPI_File_close(&outMPI); delete distCalculator;  return 0; }
+                               if (m->control_pressed) { outputTypes.clear(); MPI_File_close(&outMPI);   return 0; }
                        
                                //wait on chidren
                                for(int i = 1; i < processors; i++) { 
-                                       if (m->control_pressed) { outputTypes.clear();  MPI_File_close(&outMPI);  delete distCalculator;  return 0; }
+                                       if (m->control_pressed) { outputTypes.clear();  MPI_File_close(&outMPI);    return 0; }
                                        
                                        char buf[5];
                                        MPI_Recv(buf, 5, MPI_CHAR, i, tag, MPI_COMM_WORLD, &status); 
@@ -302,7 +302,7 @@ int DistanceCommand::execute(){
                                //do your part
                                driverMPI(start, end, outMPI, cutoff); 
                                
-                               if (m->control_pressed) { outputTypes.clear();  MPI_File_close(&outMPI);  delete distCalculator;  return 0; }
+                               if (m->control_pressed) { outputTypes.clear();  MPI_File_close(&outMPI);   return 0; }
                        
                                char buf[5];
                                strcpy(buf, "done"); 
@@ -322,7 +322,7 @@ int DistanceCommand::execute(){
                                if (output != "square"){ driverMPI(start, end, outputFile, mySize); }
                                else { driverMPI(start, end, outputFile, mySize, output); }
        
-                               if (m->control_pressed) {  outputTypes.clear();  delete distCalculator;  return 0; }
+                               if (m->control_pressed) {  outputTypes.clear();   return 0; }
                                
                                int amode=MPI_MODE_APPEND|MPI_MODE_WRONLY|MPI_MODE_CREATE; //
                                MPI_File outMPI;
@@ -341,7 +341,7 @@ int DistanceCommand::execute(){
                                for(int b = 1; b < processors; b++) { 
                                        unsigned long long fileSize;
                                        
-                                       if (m->control_pressed) { outputTypes.clear();  MPI_File_close(&outMPI);  delete distCalculator;  return 0; }
+                                       if (m->control_pressed) { outputTypes.clear();  MPI_File_close(&outMPI);   return 0; }
                                        
                                        MPI_Recv(&fileSize, 1, MPI_LONG, b, tag, MPI_COMM_WORLD, &status); 
                                        
@@ -371,7 +371,7 @@ int DistanceCommand::execute(){
                                if (output != "square"){ driverMPI(start, end, (outputFile + toString(pid) + ".temp"), size); }
                                else { driverMPI(start, end, (outputFile + toString(pid) + ".temp"), size, output); }
                                
-                               if (m->control_pressed) { delete distCalculator;  return 0; }
+                               if (m->control_pressed) {  return 0; }
                        
                                //tell parent you are done.
                                MPI_Send(&size, 1, MPI_LONG, 0, tag, MPI_COMM_WORLD);