X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=collectdisplay.h;h=781cea1824dc77cb445819c94aed3173786baa94;hp=cf507f16a7d3ce960b3393ed1c751312c08b2094;hb=cf9987b67aa49777a4c91c2d21f96e58bf17aa82;hpb=75c5a235ac3eb22e0f97d36874f4b2dcf9591f2e diff --git a/collectdisplay.h b/collectdisplay.h index cf507f1..781cea1 100644 --- a/collectdisplay.h +++ b/collectdisplay.h @@ -30,8 +30,12 @@ public: //figure out what groups are being compared in getValues //because we randomizes the order we need to put the results in the correct column in the output file int group1Index, group2Index, pos; - group1Index = shared[0]->getGroupIndex(); - group2Index = shared[1]->getGroupIndex(); + + vector mGroups = m->getGroups(); + for (int i = 0; i < mGroups.size(); i++) { + if (shared[0]->getGroup() == mGroups[i]) { group1Index = i; } + if (shared[1]->getGroup() == mGroups[i]) { group2Index = i; } + } numGroupComb = 0; int n = 1; @@ -46,7 +50,7 @@ public: } n++; } - + if ((estimate->getMultiple() == true) && all) { numGroupComb++; groupData.resize((numGroupComb*data.size()), 0);