X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=collectdisplay.h;h=781cea1824dc77cb445819c94aed3173786baa94;hp=15cc5a75a1f32edac6d234ea934ceffdad608301;hb=d1c97b8c04bb75faca1e76ffad60b37a4d789d3d;hpb=7b3c9ca940891c1b20b3b7ec13e05d7e7b316b63 diff --git a/collectdisplay.h b/collectdisplay.h index 15cc5a7..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); @@ -72,14 +76,20 @@ public: output->output(numSeqs, groupData); } }; - + void init(string s) { output->initFile(s); }; void reset() { output->resetFile(); }; void close() { output->resetFile(); }; void setAll(bool a) { all = a; } bool getAll() { return all; } - bool isCalcMultiple() { return estimate->getMultiple(); } + + bool isCalcMultiple() { return estimate->getMultiple(); } + bool calcNeedsAll() { return estimate->getNeedsAll(); } + bool hasLciHci() { + if (estimate->getCols() == 3) { return true; } + else{ return false; } + } string getName() { return estimate->getName(); }