X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=unifracunweightedcommand.cpp;h=bf2129c8b2bbc2e8e727c88bea45049464947bad;hb=692e0c1f69a78b568dc85cbdcea9fb6c189e2e6c;hp=3eedb2ecd99ff2a68342c23ab617639c3c82e312;hpb=fb5a52d8d7896ba00c9ccc6add22ed89c5fb2ad7;p=mothur.git diff --git a/unifracunweightedcommand.cpp b/unifracunweightedcommand.cpp index 3eedb2e..bf2129c 100644 --- a/unifracunweightedcommand.cpp +++ b/unifracunweightedcommand.cpp @@ -37,9 +37,16 @@ UnifracUnweightedCommand::UnifracUnweightedCommand() { //if the user only entered invalid groups if (globaldata->Groups.size() == 0) { cout << "When using the groups parameter you must have at least 1 valid group. I will run the command using all the groups in your groupfile." << endl; - } + for (int i = 0; i < tmap->namesOfGroups.size(); i++) { + globaldata->Groups.push_back(tmap->namesOfGroups[i]); + } + } + }else { + for (int i = 0; i < tmap->namesOfGroups.size(); i++) { + globaldata->Groups.push_back(tmap->namesOfGroups[i]); + } } - + convert(globaldata->getIters(), iters); //how many random trees to generate unweighted = new Unweighted(tmap); @@ -154,6 +161,9 @@ int UnifracUnweightedCommand::execute() { printUnweightedFile(); printUWSummaryFile(); + //reset groups parameter + globaldata->Groups.clear(); + delete randT; return 0;