- sumFile = globaldata->getTreeFile() + ".uwsummary";
- openOutputFile(sumFile, outSum);
- //column headers
- outSum << "Tree#" << '\t' << "Comb" << '\t' << "UWScore" << '\t' << '\t' << "UWSig" << endl;
-
- setGroups(); //sets users groups to analyze
- convert(globaldata->getIters(), iters); //how many random trees to generate
- unweighted = new Unweighted(tmap);
-
+ itersString = validParameter.validFile(parameters, "iters", false); if (itersString == "not found") { itersString = "1000"; }
+ convert(itersString, iters);
+
+ string temp = validParameter.validFile(parameters, "distance", false); if (temp == "not found") { temp = "false"; }
+ phylip = isTrue(temp);
+
+ temp = validParameter.validFile(parameters, "random", false); if (temp == "not found") { temp = "true"; }
+ random = isTrue(temp);
+
+ if (!random) { iters = 0; } //turn off random calcs
+
+ //if user selects distance = true and no groups it won't calc the pairwise
+ if ((phylip) && (Groups.size() == 0)) {
+ groups = "all";
+ splitAtDash(groups, Groups);
+ globaldata->Groups = Groups;
+ }
+
+ if (abort == false) {
+ T = globaldata->gTree;
+ tmap = globaldata->gTreemap;
+ sumFile = outputDir + getSimpleName(globaldata->getTreeFile()) + ".uwsummary";
+ outputNames.push_back(sumFile);
+ openOutputFile(sumFile, outSum);
+
+ util = new SharedUtil();
+ util->setGroups(globaldata->Groups, tmap->namesOfGroups, allGroups, numGroups, "unweighted"); //sets the groups the user wants to analyze
+ util->getCombos(groupComb, globaldata->Groups, numComp);
+
+ if (numGroups == 1) { numComp++; groupComb.push_back(allGroups); }
+
+ unweighted = new Unweighted(tmap);
+
+ }
+
+ }
+