X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=makegroupcommand.cpp;h=0add62e03a99270babfde920acca61a65dcdc2b3;hb=5cbb9328400eabc6689da26738aceee394666dfa;hp=e7704642874d050a3de7625a28ed3fae390fe653;hpb=e150b0b0664caec517485ee6d69dcdade6dcae77;p=mothur.git diff --git a/makegroupcommand.cpp b/makegroupcommand.cpp index e770464..0add62e 100644 --- a/makegroupcommand.cpp +++ b/makegroupcommand.cpp @@ -16,6 +16,7 @@ vector 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; } }