]> git.donarmstrong.com Git - mothur.git/blobdiff - makegroupcommand.cpp
added check to make sure shhh.flows child processes finish properly. added subsamplin...
[mothur.git] / makegroupcommand.cpp
index e7704642874d050a3de7625a28ed3fae390fe653..0add62e03a99270babfde920acca61a65dcdc2b3 100644 (file)
@@ -16,6 +16,7 @@ vector<string> MakeGroupCommand::setParameters(){
        try {
                CommandParameter pfasta("fasta", "InputTypes", "", "", "none", "none", "none",false,true); parameters.push_back(pfasta);
                CommandParameter pgroups("groups", "String", "", "", "", "", "",false,false); parameters.push_back(pgroups);
+               CommandParameter poutput("output", "String", "", "", "", "", "",false,false); parameters.push_back(poutput);
                CommandParameter pinputdir("inputdir", "String", "", "", "", "", "",false,false); parameters.push_back(pinputdir);
                CommandParameter poutputdir("outputdir", "String", "", "", "", "", "",false,false); parameters.push_back(poutputdir);
                
@@ -159,7 +160,7 @@ MakeGroupCommand::MakeGroupCommand(string option)  {
                                                        //erase from file list
                                                        fastaFileNames.erase(fastaFileNames.begin()+i);
                                                        i--;
-                                               }else{  filename += m->getRootName(m->getSimpleName(fastaFileNames[i]));  }
+                                               }else{  filename += m->getRootName(m->getSimpleName(fastaFileNames[i]));  m->setFastaFile(fastaFileNames[i]); }
                                        }
                                }
                                
@@ -205,7 +206,7 @@ int MakeGroupCommand::execute(){
                
                for (int i = 0; i < fastaFileNames.size(); i++) {
                
-                       if (m->control_pressed) { outputTypes.clear(); out.close(); remove(filename.c_str()); return 0; }
+                       if (m->control_pressed) { outputTypes.clear(); out.close(); m->mothurRemove(filename); return 0; }
                        
                        ifstream in;
                        m->openInputFile(fastaFileNames[i], in);
@@ -214,7 +215,7 @@ int MakeGroupCommand::execute(){
                                
                                Sequence seq(in, "no align"); m->gobble(in);
                                
-                               if (m->control_pressed) { outputTypes.clear();  in.close(); out.close(); remove(filename.c_str()); return 0; }
+                               if (m->control_pressed) { outputTypes.clear();  in.close(); out.close(); m->mothurRemove(filename); return 0; }
                                
                                if (seq.getName() != "") {      out << seq.getName() << '\t' << groupsNames[i] << endl;         }
                        }