X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=sensspeccommand.cpp;fp=sensspeccommand.cpp;h=78dce1794003457a077fe993958c75909c1020a7;hb=8bc3e5b38c2317a1715f53be22fa96455868c281;hp=8489bfefc841f6dd34fea17ef15b416e08c4c6c8;hpb=f663afa231c9bc1b5e18e0ea3bdd2b2ee784f5b2;p=mothur.git diff --git a/sensspeccommand.cpp b/sensspeccommand.cpp index 8489bfe..78dce17 100644 --- a/sensspeccommand.cpp +++ b/sensspeccommand.cpp @@ -9,6 +9,53 @@ #include "sensspeccommand.h" +//********************************************************************************************************************** +vector SensSpecCommand::getValidParameters(){ + try { + string Array[] = {"list", "phylip", "column", "name", "hard", "label", "cutoff", "precision", "outputdir", "inputdir"}; + vector myArray (Array, Array+(sizeof(Array)/sizeof(string))); + return myArray; + } + catch(exception& e) { + m->errorOut(e, "SensSpecCommand", "getValidParameters"); + exit(1); + } +} +//********************************************************************************************************************** +SensSpecCommand::SensSpecCommand(){ + try { + //initialize outputTypes + vector tempOutNames; + outputTypes["sensspec"] = tempOutNames; + } + catch(exception& e) { + m->errorOut(e, "SensSpecCommand", "SensSpecCommand"); + exit(1); + } +} +//********************************************************************************************************************** +vector SensSpecCommand::getRequiredParameters(){ + try { + string Array[] = {"list","phylip","column","or"}; + vector myArray (Array, Array+(sizeof(Array)/sizeof(string))); + return myArray; + } + catch(exception& e) { + m->errorOut(e, "SensSpecCommand", "getRequiredParameters"); + exit(1); + } +} +//********************************************************************************************************************** +vector SensSpecCommand::getRequiredFiles(){ + try { + vector myArray; + return myArray; + } + catch(exception& e) { + m->errorOut(e, "SensSpecCommand", "getRequiredFiles"); + exit(1); + } +} //*************************************************************************************************************** SensSpecCommand::SensSpecCommand(string option) { @@ -38,6 +85,10 @@ SensSpecCommand::SensSpecCommand(string option) { if (validParameter.isValidParameter(it->first, myArray, it->second) != true) { abort = true; } } + //initialize outputTypes + vector tempOutNames; + outputTypes["sensspec"] = tempOutNames; + //if the user changes the input directory command factory will send this info to us in the output parameter string inputDir = validParameter.validFile(parameters, "inputdir", false); if (inputDir == "not found"){ inputDir = ""; } @@ -159,6 +210,7 @@ int SensSpecCommand::execute(){ if (abort == true) { return 0; } setUpOutput(); + outputNames.push_back(sensSpecFileName); outputTypes["sensspec"].push_back(sensSpecFileName); if(format == "phylip") { processPhylip(); } else if(format == "column") { processColumn(); }