X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=chimerauchimecommand.cpp;h=d4cb57a3158a85008d30d9c875e331f5be5801e9;hb=1c898913f53fe4c6574102896b967d9347d1b42a;hp=a47aed0ca840197331cdf251ef48bcb68cf9df56;hpb=1e8d08e96f4fe99604a6b3502568de464bf60891;p=mothur.git diff --git a/chimerauchimecommand.cpp b/chimerauchimecommand.cpp index a47aed0..d4cb57a 100644 --- a/chimerauchimecommand.cpp +++ b/chimerauchimecommand.cpp @@ -309,9 +309,11 @@ ChimeraUchimeCommand::ChimeraUchimeCommand(string option) { templatefile = validParameter.validFile(parameters, "reference", true); if (templatefile == "not open") { abort = true; } - else if (templatefile == "not found") { templatefile = ""; m->mothurOut("reference is a required parameter for the chimera.slayer command."); m->mothurOutEndLine(); abort = true; } + else if (templatefile == "not found") { templatefile = ""; m->mothurOut("reference is a required parameter for the chimera.uchime command."); m->mothurOutEndLine(); abort = true; } } - } + }else if (hasName) { templatefile = "self"; } + else { templatefile = ""; m->mothurOut("reference is a required parameter for the chimera.uchime command, unless you have a namefile."); m->mothurOutEndLine(); abort = true; } + string temp = validParameter.validFile(parameters, "processors", false); if (temp == "not found"){ temp = m->getProcessors(); } m->setProcessors(temp); @@ -370,7 +372,7 @@ int ChimeraUchimeCommand::execute(){ int start = time(NULL); string nameFile = ""; - if (templatefile == "self") { //you want to run slayer with a refernce template + if (templatefile == "self") { //you want to run uchime with a refernce template #ifdef USE_MPI int pid; @@ -694,6 +696,8 @@ int ChimeraUchimeCommand::driver(string outputFName, string filename, string acc for(int i = 0; i < cPara.size(); i++) { delete[] cPara[i]; } delete[] uchimeParameters; + if (m->control_pressed) { return 0; } + //create accnos file from uchime results ifstream in; m->openInputFile(outputFName, in); @@ -711,7 +715,7 @@ int ChimeraUchimeCommand::driver(string outputFName, string filename, string acc in >> chimeraFlag >> name; //fix name if needed - if (templatefile != "self") { + if (templatefile == "self") { name = name.substr(0, name.length()-1); //rip off last / name = name.substr(0, name.find_last_of('/')); }