X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=readotucommand.cpp;h=8683fc3fa80154729ea5228fcaa38fb03726603a;hb=1d5962b46d9e72a2b855b4176d1c47df9a163fac;hp=efd7073fae39fd493ef28f22d81d6bfdcf795859;hpb=260ae19c36cb11a53ddc5a75b5e507f8dd8b31d6;p=mothur.git diff --git a/readotucommand.cpp b/readotucommand.cpp index efd7073..8683fc3 100644 --- a/readotucommand.cpp +++ b/readotucommand.cpp @@ -9,6 +9,55 @@ #include "readotucommand.h" +//********************************************************************************************************************** +vector ReadOtuCommand::getValidParameters(){ + try { + string Array[] = {"list","order","shared","relabund","label","group","sabund", "rabund","groups","ordergroup","outputdir","inputdir"}; + vector myArray (Array, Array+(sizeof(Array)/sizeof(string))); + return myArray; + } + catch(exception& e) { + m->errorOut(e, "ReadOtuCommand", "getValidParameters"); + exit(1); + } +} +//********************************************************************************************************************** +ReadOtuCommand::ReadOtuCommand(){ + try { + abort = true; + //initialize outputTypes + vector tempOutNames; + outputTypes["rabund"] = tempOutNames; + outputTypes["shared"] = tempOutNames; + } + catch(exception& e) { + m->errorOut(e, "ReadOtuCommand", "ReadOtuCommand"); + exit(1); + } +} +//********************************************************************************************************************** +vector ReadOtuCommand::getRequiredParameters(){ + try { + string Array[] = {"list","shared","relabund","sabund","rabund","or"}; + vector myArray (Array, Array+(sizeof(Array)/sizeof(string))); + return myArray; + } + catch(exception& e) { + m->errorOut(e, "ChopSeqsCommand", "getRequiredParameters"); + exit(1); + } +} +//********************************************************************************************************************** +vector ReadOtuCommand::getRequiredFiles(){ + try { + vector myArray; + return myArray; + } + catch(exception& e) { + m->errorOut(e, "ReadOtuCommand", "getRequiredFiles"); + exit(1); + } +} //********************************************************************************************************************** ReadOtuCommand::ReadOtuCommand(string option) { try { @@ -34,7 +83,12 @@ ReadOtuCommand::ReadOtuCommand(string option) { for (it = parameters.begin(); it != parameters.end(); it++) { if (validParameter.isValidParameter(it->first, myArray, it->second) != true) { abort = true; } } - + + //initialize outputTypes + vector tempOutNames; + outputTypes["rabund"] = tempOutNames; + outputTypes["shared"] = tempOutNames; + globaldata->newRead(); //if the user changes the input directory command factory will send this info to us in the output parameter @@ -255,6 +309,8 @@ int ReadOtuCommand::execute(){ //m->mothurOutEndLine(); } + outputTypes = shared->getOutputFiles(); + delete shared; } return 0;