//**********************************************************************************************************************
ConcensusCommand::ConcensusCommand(){
try {
- abort = true;
- //initialize outputTypes
+ abort = true; calledHelp = true;
vector<string> tempOutNames;
outputTypes["tree"] = tempOutNames;
outputTypes["nodepairs"] = tempOutNames;
ConcensusCommand::ConcensusCommand(string fileroot) {
try {
globaldata = GlobalData::getInstance();
- abort = false;
+ abort = false; calledHelp = false;
//initialize outputTypes
vector<string> tempOutNames;
int ConcensusCommand::execute(){
try {
- if (abort == true) { return 0; }
+ if (abort == true) { if (calledHelp) { return 0; } return 2; }
else {
numNodes = t[0]->getNumNodes();
numLeaves = t[0]->getNumLeaves();
delete consensusTree;
+ //set first tree file as new current treefile
+ string currentTree = "";
+ itTypes = outputTypes.find("tree");
+ if (itTypes != outputTypes.end()) {
+ if ((itTypes->second).size() != 0) { currentTree = (itTypes->second)[0]; m->setTreeFile(currentTree); }
+ }
+
return 0;
}
catch(exception& e) {