- if (!(m->inUsersGroups(globaldata->Treenames[i], globaldata->gGroupmap->namesOfGroups))) {
- m->mothurOut("[ERROR]: " + globaldata->Treenames[i] + " is not a group in your shared or relabund file."); m->mothurOutEndLine();
- mismatch = true;
+ if (designfile == "") {
+ if (!(m->inUsersGroups(globaldata->Treenames[i], globaldata->gGroupmap->namesOfGroups))) {
+ m->mothurOut("[ERROR]: " + globaldata->Treenames[i] + " is not a group in your shared or relabund file."); m->mothurOutEndLine();
+ mismatch = true;
+ }
+ treeMap->addSeq(globaldata->Treenames[i], "Group1");
+ }else{
+ vector<string> myGroups; myGroups.push_back(globaldata->Treenames[i]);
+ vector<string> myNames = designMap->getNamesSeqs(myGroups);
+
+ for(int k = 0; k < myNames.size(); k++) {
+ if (!(m->inUsersGroups(myNames[k], globaldata->gGroupmap->namesOfGroups))) {
+ m->mothurOut("[ERROR]: " + myNames[k] + " is not a group in your shared or relabund file."); m->mothurOutEndLine();
+ mismatch = true;
+ }
+ }
+ treeMap->addSeq(globaldata->Treenames[i], "Group1");