int SensSpecCommand::execute(){ try{ if (abort == true) { if (calledHelp) { return 0; } return 2; } int startTime = time(NULL); //create list file with only unique names, saves time and memory by removing redundant names from list file that are not in the distance file. string newListFile = preProcessList(); if (newListFile != "") { listFile = newListFile; } setUpOutput(); outputNames.push_back(sensSpecFileName); outputTypes["sensspec"].push_back(sensSpecFileName); if(format == "phylip") { processPhylip(); } else if(format == "column") { processColumn(); } //remove temp file if created if (newListFile != "") { m->mothurRemove(newListFile); } if (m->control_pressed) { m->mothurRemove(sensSpecFileName); return 0; } m->mothurOut("It took " + toString(time(NULL) - startTime) + " to run sens.spec."); m->mothurOutEndLine(); m->mothurOutEndLine(); m->mothurOut("Output File Names: "); m->mothurOutEndLine(); m->mothurOut(sensSpecFileName); m->mothurOutEndLine(); m->mothurOutEndLine(); return 0; } catch(exception& e) { m->errorOut(e, "SensSpecCommand", "execute"); exit(1); } }
int SensSpecCommand::execute(){ try{ if (abort == true) { if (calledHelp) { return 0; } return 2; } setUpOutput(); outputNames.push_back(sensSpecFileName); outputTypes["sensspec"].push_back(sensSpecFileName); if(format == "phylip") { processPhylip(); } else if(format == "column") { processColumn(); } if (m->control_pressed) { m->mothurRemove(sensSpecFileName); return 0; } m->mothurOutEndLine(); m->mothurOut("Output File Name: "); m->mothurOutEndLine(); m->mothurOut(sensSpecFileName); m->mothurOutEndLine(); m->mothurOutEndLine(); return 0; } catch(exception& e) { m->errorOut(e, "SensSpecCommand", "execute"); exit(1); } }