]> git.donarmstrong.com Git - mothur.git/blobdiff - trimseqscommand.cpp
fixed cluster.split bug
[mothur.git] / trimseqscommand.cpp
index 56fd8c54b53aaff9f4e43e8e694fc71f6987fd7c..8aacd9d7c78b767acbf7c00ab92f945dff11dc2d 100644 (file)
@@ -26,6 +26,7 @@ vector<string> TrimSeqsCommand::getValidParameters(){
 //**********************************************************************************************************************
 TrimSeqsCommand::TrimSeqsCommand(){    
        try {
+               abort = true;
                //initialize outputTypes
                vector<string> tempOutNames;
                outputTypes["fasta"] = tempOutNames;
@@ -713,7 +714,11 @@ int TrimSeqsCommand::createProcessesCreateTrim(string filename, string qFileName
                        }else if (pid == 0){
                                driverCreateTrim(filename, qFileName, (trimFile + toString(getpid()) + ".temp"), (scrapFile + toString(getpid()) + ".temp"), (trimQFile + toString(getpid()) + ".temp"), (scrapQFile + toString(getpid()) + ".temp"), (groupFile + toString(getpid()) + ".temp"), fastaNames, qualNames, lines[process], qLines[process]);
                                exit(0);
-                       }else { m->mothurOut("unable to spawn the necessary processes."); m->mothurOutEndLine(); exit(0); }
+                       }else { 
+                               m->mothurOut("[ERROR]: unable to spawn the necessary processes."); m->mothurOutEndLine(); 
+                               for (int i = 0; i < processIDS.size(); i++) { kill (processIDS[i], SIGINT); }
+                               exit(0);
+                       }
                }
                
                //force parent to wait until all the processes are done
@@ -757,7 +762,7 @@ int TrimSeqsCommand::setLines(string filename, string qfilename, vector<unsigned
                //seach for filePos of each first name in the qfile and save in qfileFilePos
                ifstream inQual;
                m->openInputFile(qfilename, inQual);
-                       
+               
                string input;
                while(!inQual.eof()){   
                        input = m->getline(inQual);
@@ -783,6 +788,7 @@ int TrimSeqsCommand::setLines(string filename, string qfilename, vector<unsigned
                }
                inQual.close();
                
+               
                if (firstSeqNames.size() != 0) { 
                        for (map<string, int>::iterator it = firstSeqNames.begin(); it != firstSeqNames.end(); it++) {
                                m->mothurOut(it->first + " is in your fasta file and not in your quality file, not using quality file."); m->mothurOutEndLine();