]> git.donarmstrong.com Git - mothur.git/blobdiff - groupmap.cpp
removed read.dist, read.otu, read.tree and globaldata. added current to defaults...
[mothur.git] / groupmap.cpp
index f6705e53db2048691b95050f3005bdccecf21347..58e04c5db858791f28a99a5cb50795a570da0690 100644 (file)
@@ -44,6 +44,7 @@ int GroupMap::readMap() {
                        m->gobble(fileHandle);
                }
                fileHandle.close();
+               m->namesOfGroups = namesOfGroups;
                return error;
 }
 /************************************************************/
@@ -69,6 +70,7 @@ int GroupMap::readDesignMap() {
                        m->gobble(fileHandle);
                }
                fileHandle.close();
+               m->namesOfGroups = namesOfGroups;
                return error;
 }
 
@@ -161,4 +163,25 @@ vector<string> GroupMap::getNamesSeqs(){
        }
 }
 /************************************************************/
+vector<string> GroupMap::getNamesSeqs(vector<string> picked){
+       try {
+               
+               vector<string> names;
+               
+               for (it = groupmap.begin(); it != groupmap.end(); it++) {
+                       //if you are belong to one the the groups in the picked vector add you
+                       if (m->inUsersGroups(it->second, picked)) {
+                               names.push_back(it->first);
+                       }
+               }
+               
+               return names;
+       }
+       catch(exception& e) {
+               m->errorOut(e, "GroupMap", "getNamesSeqs");
+               exit(1);
+       }
+}
+
+/************************************************************/