]> git.donarmstrong.com Git - mothur.git/blobdiff - groupmap.cpp
added modify names parameter to set.dir
[mothur.git] / groupmap.cpp
index 8e2139db771010d1b372ccfdc0a6a0523c6e4849..9d2736405f8e306dc8e5238f8bad1a26b92b88bb 100644 (file)
@@ -372,6 +372,22 @@ bool GroupMap::isValidGroup(string groupname) {
        }
 }
 /************************************************************/
+int GroupMap::getCopy(GroupMap* g) {
+       try {
+        vector<string> names = g->getNamesSeqs();
+        for (int i = 0; i < names.size(); i++) {
+            if (m->control_pressed) { break; }
+            string group = g->getGroup(names[i]);
+            setGroup(names[i], group);
+        }
+        return names.size();
+       }
+       catch(exception& e) {
+               m->errorOut(e, "GroupMap", "getCopy");
+               exit(1);
+       }
+}
+/************************************************************/
 int GroupMap::getNumSeqs(string group) {
        try {