- globaldata->gTreemap->namesOfSeqs.push_back(name);
- globaldata->gTreemap->treemap[name].groupname = "xxx";
-
- map<string, int>::iterator it;
- it = globaldata->gTreemap->seqsPerGroup.find("xxx");
- if (it == globaldata->gTreemap->seqsPerGroup.end()) { //its a new group
- globaldata->gTreemap->namesOfGroups.push_back("xxx");
- globaldata->gTreemap->seqsPerGroup["xxx"] = 1;
- }else {
- globaldata->gTreemap->seqsPerGroup["xxx"]++;
- }
-
- group = "xxx";
- }
-
- vector<string> tempGroup; tempGroup.push_back(group);
-
- T->tree[n1].setGroup(tempGroup);
+ vector<string> currentGroups = ct->getNamesOfGroups();
+ if (!m->inUsersGroups("xxx", currentGroups)) { ct->addGroup("xxx"); }
+ currentGroups = ct->getNamesOfGroups();
+ vector<int> thisCounts; thisCounts.resize(currentGroups.size(), 0);
+ for (int h = 0; h < currentGroups.size(); h++) {
+ if (currentGroups[h] == "xxx") { thisCounts[h] = 1; break; }
+ }
+ ct->push_back(name, thisCounts);
+
+ group.push_back("xxx");
+ }
+ T->tree[n1].setGroup(group);