X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=collectcommand.cpp;fp=collectcommand.cpp;h=73de2a42ffb7fecfa6b5591f076bf7f893271b53;hb=49d2b7459c5027557564b21e9487dadafbbbdc96;hp=7ad41367f795abe7aeeda1052a8211daf72aeaf4;hpb=ee8403d4eb5760187d62b42a9cf4272de8fc0ec4;p=mothur.git diff --git a/collectcommand.cpp b/collectcommand.cpp index 7ad4136..73de2a4 100644 --- a/collectcommand.cpp +++ b/collectcommand.cpp @@ -81,6 +81,50 @@ string CollectCommand::getHelpString(){ } } //********************************************************************************************************************** +string CollectCommand::getOutputFileNameTag(string type, string inputName=""){ + try { + string outputFileName = ""; + map >::iterator it; + + //is this a type this command creates + it = outputTypes.find(type); + if (it == outputTypes.end()) { m->mothurOut("[ERROR]: this command doesn't create a " + type + " output file.\n"); } + else { + if (type == "sobs") { outputFileName = "sobs"; } + else if (type == "chao") { outputFileName = "chao"; } + else if (type == "nseqs") { outputFileName = "nseqs"; } + else if (type == "coverage") { outputFileName = "coverage"; } + else if (type == "ace") { outputFileName = "ace"; } + else if (type == "jack") { outputFileName = "jack"; } + else if (type == "shannon") { outputFileName = "shannon"; } + else if (type == "shannoneven") { outputFileName = "shannoneven"; } + else if (type == "npshannon") { outputFileName = "npshannon"; } + else if (type == "heip") { outputFileName = "heip"; } + else if (type == "smithwilson") { outputFileName = "smithwilson"; } + else if (type == "simpson") { outputFileName = "simpson"; } + else if (type == "simpsoneven") { outputFileName = "simpsoneven"; } + else if (type == "invsimpson") { outputFileName = "invsimpson"; } + else if (type == "bootstrap") { outputFileName = "bootstrap"; } + else if (type == "geometric") { outputFileName = "geometric"; } + else if (type == "qstat") { outputFileName = "qstat"; } + else if (type == "logseries") { outputFileName = "logseries"; } + else if (type == "bergerparker") { outputFileName = "bergerparker"; } + else if (type == "bstick") { outputFileName = "bstick"; } + else if (type == "goodscoverage") { outputFileName = "goodscoverage"; } + else if (type == "efron") { outputFileName = "efron"; } + else if (type == "boneh") { outputFileName = "boneh"; } + else if (type == "solow") { outputFileName = "solow"; } + else if (type == "shen") { outputFileName = "shen"; } + else { m->mothurOut("[ERROR]: No definition for type " + type + " output file tag.\n"); m->control_pressed = true; } + } + return outputFileName; + } + catch(exception& e) { + m->errorOut(e, "CollectCommand", "getOutputFileNameTag"); + exit(1); + } +} +//********************************************************************************************************************** CollectCommand::CollectCommand(){ try { abort = true; calledHelp = true; @@ -322,80 +366,80 @@ int CollectCommand::execute(){ for (int i=0; i