]> git.donarmstrong.com Git - mothur.git/blobdiff - unifracunweightedcommand.cpp
fixed bug in read.tree updates help and validparameters strings, added ability for...
[mothur.git] / unifracunweightedcommand.cpp
index 65f30ebc949f4945023fd295224d00d52827d82b..2b93df782bccc4d2dbc8533e7cdc38169059d6a7 100644 (file)
@@ -211,9 +211,11 @@ void UnifracUnweightedCommand::setGroups() {
                                if (globaldata->Groups.size() == 0) { 
                                        cout << "When using the groups parameter you must have at least 1 valid group. I will run the command using all the groups in your groupfile." << endl; 
                                        for (int i = 0; i < tmap->namesOfGroups.size(); i++) {
-                                               globaldata->Groups.push_back(tmap->namesOfGroups[i]);
-                                               numGroups++;
-                                               allGroups += tmap->namesOfGroups[i] + "-";
+                                               if (tmap->namesOfGroups[i] != "xxx") {
+                                                       globaldata->Groups.push_back(tmap->namesOfGroups[i]);
+                                                       numGroups++;
+                                                       allGroups += tmap->namesOfGroups[i] + "-";
+                                               }
                                        }
                                        allGroups = allGroups.substr(0, allGroups.length()-1);
                                }else {
@@ -226,16 +228,20 @@ void UnifracUnweightedCommand::setGroups() {
                        }else{//user has enter "all" and wants the default groups
                                globaldata->Groups.clear();
                                for (int i = 0; i < tmap->namesOfGroups.size(); i++) {
-                                       globaldata->Groups.push_back(tmap->namesOfGroups[i]);
-                                       numGroups++;
-                                       allGroups += tmap->namesOfGroups[i] + "-";
+                                       if (tmap->namesOfGroups[i] != "xxx") {
+                                               globaldata->Groups.push_back(tmap->namesOfGroups[i]);
+                                               numGroups++;
+                                               allGroups += tmap->namesOfGroups[i] + "-";
+                                       }
                                }
                                allGroups = allGroups.substr(0, allGroups.length()-1);
                                globaldata->setGroups("");
                        }
                }else {
                        for (int i = 0; i < tmap->namesOfGroups.size(); i++) {
-                               allGroups += tmap->namesOfGroups[i] + "-";
+                               if (tmap->namesOfGroups[i] != "xxx") {
+                                       allGroups += tmap->namesOfGroups[i] + "-";
+                               }
                        }
                        allGroups = allGroups.substr(0, allGroups.length()-1);
                        numGroups = 1;