+void TreeMap::addSeq(string seqName, string seqGroup) {
+
+ namesOfSeqs.push_back(seqName);
+ setNamesOfGroups(seqGroup);
+
+ treemap[seqName].groupname = seqGroup; //store data in map
+
+ it2 = seqsPerGroup.find(seqGroup);
+ if (it2 == seqsPerGroup.end()) { //if it's a new group
+ seqsPerGroup[seqGroup] = 1;
+ }else {//it's a group we already have
+ seqsPerGroup[seqGroup]++;
+ }
+}
+/************************************************************/
+void TreeMap::removeSeq(string seqName) {
+
+ //erase name from namesOfSeqs
+ for (int i = 0; i < namesOfSeqs.size(); i++) {
+ if (namesOfSeqs[i] == seqName) {
+ namesOfSeqs.erase(namesOfSeqs.begin()+i);
+ break;
+ }
+ }
+
+ //decrement sequences in this group
+ string group = treemap[seqName].groupname;
+ seqsPerGroup[group]--;
+
+ //remove seq from treemap
+ it = treemap.find(seqName);
+ treemap.erase(it);
+}
+/************************************************************/