X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=getcurrentcommand.cpp;h=d74786ce1eaaa8767164a0fbd670d06843388b44;hb=250e3b11b1c9c1e1ad458ab6c7e71ac2e67e11d9;hp=7bfae208ad9eb6b1a94ba92e2ae028c2f986f24a;hpb=ca9ac1d80c62f57270b0dcd49410ebe08a8aecd6;p=mothur.git diff --git a/getcurrentcommand.cpp b/getcurrentcommand.cpp index 7bfae20..d74786c 100644 --- a/getcurrentcommand.cpp +++ b/getcurrentcommand.cpp @@ -12,9 +12,9 @@ //********************************************************************************************************************** vector GetCurrentCommand::setParameters(){ try { - CommandParameter pclear("clear", "String", "", "", "", "", "",false,false); parameters.push_back(pclear); - CommandParameter pinputdir("inputdir", "String", "", "", "", "", "",false,false); parameters.push_back(pinputdir); - CommandParameter poutputdir("outputdir", "String", "", "", "", "", "",false,false); parameters.push_back(poutputdir); + CommandParameter pclear("clear", "String", "", "", "", "", "","",false,false); parameters.push_back(pclear); + CommandParameter pinputdir("inputdir", "String", "", "", "", "", "","",false,false); parameters.push_back(pinputdir); + CommandParameter poutputdir("outputdir", "String", "", "", "", "", "","",false,false); parameters.push_back(poutputdir); vector myArray; for (int i = 0; i < parameters.size(); i++) { myArray.push_back(parameters[i].name); } @@ -59,6 +59,7 @@ GetCurrentCommand::GetCurrentCommand(string option) { //allow user to run help if(option == "help") { help(); abort = true; calledHelp = true; } + else if(option == "citation") { citation(); abort = true; calledHelp = true;} else { vector myArray = setParameters(); @@ -134,7 +135,17 @@ int GetCurrentCommand::execute(){ }else if (types[i] == "accnos") { m->setAccnosFile(""); }else if (types[i] == "taxonomy") { - m->setTaxonomyFile(""); + m->setTaxonomyFile(""); + }else if (types[i] == "flow") { + m->setFlowFile(""); + }else if (types[i] == "biom") { + m->setBiomFile(""); + }else if (types[i] == "count") { + m->setCountTableFile(""); + }else if (types[i] == "summary") { + m->setSummaryFile(""); + }else if (types[i] == "processors") { + m->setProcessors("1"); }else if (types[i] == "all") { m->clearCurrentFiles(); }else { @@ -143,8 +154,10 @@ int GetCurrentCommand::execute(){ } } - m->mothurOutEndLine(); m->mothurOut("Current files saved by mothur:"); m->mothurOutEndLine(); - m->printCurrentFiles(); + if (m->hasCurrentFiles()) { + m->mothurOutEndLine(); m->mothurOut("Current files saved by mothur:"); m->mothurOutEndLine(); + m->printCurrentFiles(); + } return 0; }