]> git.donarmstrong.com Git - mothur.git/blobdiff - groupmap.cpp
added design parameter to the indicator command
[mothur.git] / groupmap.cpp
index f6705e53db2048691b95050f3005bdccecf21347..9e9955671e41a6cfff3dc882e29ccbc4de9414ca 100644 (file)
@@ -161,4 +161,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);
+       }
+}
+
+/************************************************************/