//**********************************************************************************************************************
GetSAbundCommand::GetSAbundCommand(){
try {
- //initialize outputTypes
+ abort = true; calledHelp = true;
vector<string> tempOutNames;
outputTypes["sabund"] = tempOutNames;
}
GetSAbundCommand::GetSAbundCommand(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
int GetSAbundCommand::execute(){
try {
- if (abort == true) { return 0; }
+ if (abort == true) { if (calledHelp) { return 0; } return 2; }
//using order vector so you don't have to distinguish between the list and rabund files
read = new ReadOTUFile(globaldata->inputFileName);
m->mothurOut(filename); m->mothurOutEndLine(); outputNames.push_back(filename); outputTypes["sabund"].push_back(filename);
m->mothurOutEndLine();
+ //set sabund file as new current sabundfile
+ string current = "";
+ itTypes = outputTypes.find("sabund");
+ if (itTypes != outputTypes.end()) {
+ if ((itTypes->second).size() != 0) { current = (itTypes->second)[0]; m->setSabundFile(current); }
+ }
+
return 0;
}