X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=venncommand.cpp;h=c918500270a537ac909326f3edc10ad068dc3ac5;hb=b866e1519a60681527244036428104ad1cb90c93;hp=1b4e3bc70848d7511c1dcd136fb4c320e4265b11;hpb=0caf3fbabaa3ece404f8ce77f4c883dc5b1bf1dc;p=mothur.git diff --git a/venncommand.cpp b/venncommand.cpp index 1b4e3bc..c918500 100644 --- a/venncommand.cpp +++ b/venncommand.cpp @@ -66,6 +66,27 @@ string VennCommand::getHelpString(){ exit(1); } } +//********************************************************************************************************************** + +string VennCommand::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 == "svg") { outputFileName = "svg"; } + 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, "VennCommand", "getOutputFileNameTag"); + exit(1); + } +} //********************************************************************************************************************** VennCommand::VennCommand(){ @@ -229,8 +250,7 @@ int VennCommand::execute(){ }else if (Estimators[i] == "chao") { vennCalculators.push_back(new Chao1()); }else if (Estimators[i] == "ace") { - if(abund < 5) - abund = 10; + if(abund < 5) { abund = 10; } vennCalculators.push_back(new Ace(abund)); } }