+}
+
+/************************************************************/
+void TreeMap::makeSim(vector<string> ThisnamesOfGroups) {
+ try {
+ //set names of groups
+ namesOfGroups = ThisnamesOfGroups;
+
+ //set names of seqs to names of groups
+ namesOfSeqs = ThisnamesOfGroups;
+
+ // make map where key and value are both the group name since that what the tree.shared command wants
+ for (int i = 0; i < namesOfGroups.size(); i++) {
+ treemap[namesOfGroups[i]].groupname = namesOfGroups[i];
+ seqsPerGroup[namesOfGroups[i]] = 1;
+ }
+
+ numGroups = namesOfGroups.size();
+
+ }
+ catch(exception& e) {
+ m->errorOut(e, "TreeMap", "makeSim");
+ exit(1);
+ }
+}
+/************************************************************/
+void TreeMap::makeSim(ListVector* list) {
+ try {
+ //set names of groups
+ namesOfGroups.clear();
+ for(int i = 0; i < list->size(); i++) {
+ namesOfGroups.push_back(list->get(i));
+ }
+
+ //set names of seqs to names of groups
+ namesOfSeqs = namesOfGroups;
+
+ // make map where key and value are both the group name since that what the tree.shared command wants
+ for (int i = 0; i < namesOfGroups.size(); i++) {
+ treemap[namesOfGroups[i]].groupname = namesOfGroups[i];
+ seqsPerGroup[namesOfGroups[i]] = 1;
+ }
+
+ numGroups = namesOfGroups.size();
+
+ }
+ catch(exception& e) {
+ m->errorOut(e, "TreeMap", "makeSim");
+ exit(1);
+ }
+}
+/************************************************************/
+int TreeMap::getCopy(TreeMap& copy){
+ try {
+
+ namesOfGroups = copy.getNamesOfGroups();
+ numGroups = copy.getNumGroups();
+ namesOfSeqs = copy.namesOfSeqs;
+ seqsPerGroup = copy.seqsPerGroup;
+ treemap = copy.treemap;
+
+ return 0;
+ }
+ catch(exception& e) {
+ m->errorOut(e, "TreeMap", "getCopy");
+ exit(1);
+ }
+}
+/************************************************************/
+vector<string> TreeMap::getNamesSeqs(){
+ try {
+
+ vector<string> names;
+
+ for(it = treemap.begin(); it != treemap.end(); it++){
+ names.push_back(it->first);
+ }
+
+ return names;
+ }
+ catch(exception& e) {
+ m->errorOut(e, "TreeMap", "getNamesSeqs");
+ exit(1);
+ }
+}
+/************************************************************/
+vector<string> TreeMap::getNamesSeqs(vector<string> picked){
+ try {
+
+ vector<string> names;
+
+ for(it = treemap.begin(); it != treemap.end(); it++){
+ //if you are belong to one the the groups in the picked vector add you
+ if (m->inUsersGroups(it->second.groupname, picked)) {
+ names.push_back(it->first);
+ }
+ }
+
+ return names;
+ }
+ catch(exception& e) {
+ m->errorOut(e, "TreeMap", "getNamesSeqs");