X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=getrabundcommand.cpp;h=3b03f3694967d6d480ba0dc00153454c7e8b074f;hb=348de0f8b17d84ede77081dcf67bd6ef43496677;hp=a38aeb30dea60a2fe67984fa05dc83b6fb9130e1;hpb=8bc3e5b38c2317a1715f53be22fa96455868c281;p=mothur.git diff --git a/getrabundcommand.cpp b/getrabundcommand.cpp index a38aeb3..3b03f36 100644 --- a/getrabundcommand.cpp +++ b/getrabundcommand.cpp @@ -24,7 +24,7 @@ vector GetRAbundCommand::getValidParameters(){ //********************************************************************************************************************** GetRAbundCommand::GetRAbundCommand(){ try { - //initialize outputTypes + abort = true; calledHelp = true; vector tempOutNames; outputTypes["rabund"] = tempOutNames; } @@ -61,12 +61,12 @@ vector GetRAbundCommand::getRequiredFiles(){ GetRAbundCommand::GetRAbundCommand(string option) { try { globaldata = GlobalData::getInstance(); - abort = false; + abort = false; calledHelp = false; allLines = 1; labels.clear(); //allow user to run help - if(option == "help") { help(); abort = true; } + if(option == "help") { help(); abort = true; calledHelp = true; } else { //valid paramters for this command @@ -157,7 +157,7 @@ GetRAbundCommand::~GetRAbundCommand(){} int GetRAbundCommand::execute(){ try { - if (abort == true) { return 0; } + if (abort == true) { if (calledHelp) { return 0; } return 2; } //read first line read = new ReadOTUFile(globaldata->inputFileName); @@ -262,6 +262,13 @@ int GetRAbundCommand::execute(){ globaldata->gListVector = NULL; + //set rabund file as new current rabundfile + string current = ""; + itTypes = outputTypes.find("rabund"); + if (itTypes != outputTypes.end()) { + if ((itTypes->second).size() != 0) { current = (itTypes->second)[0]; m->setRabundFile(current); } + } + return 0; }