X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=treegroupscommand.cpp;h=0d014599fa794217233694f8a28ed707b99c86eb;hb=8159f34321e2c771638059b59a986caca9f3ab60;hp=90d336da38f57f70fa0f5ddb59125cc2099ec346;hpb=1a5c2356c1b955c6ec024b2baf9f46377ee7c72e;p=mothur.git diff --git a/treegroupscommand.cpp b/treegroupscommand.cpp index 90d336d..0d01459 100644 --- a/treegroupscommand.cpp +++ b/treegroupscommand.cpp @@ -429,7 +429,10 @@ int TreeGroupCommand::execute(){ m->Treenames.clear(); //fills globaldatas tree names - m->Treenames = m->getGroups(); + //m->Treenames = m->getGroups(); + for (int k = 0; k < lookup.size(); k++) { + m->Treenames.push_back(lookup[k]->getGroup()); + } if (m->control_pressed) { return 0; } @@ -463,7 +466,10 @@ int TreeGroupCommand::execute(){ list = readMatrix->getListVector(); SparseDistanceMatrix* dMatrix = readMatrix->getDMatrix(); - + + //clear globaldatas old tree names if any + m->Treenames.clear(); + //make treemap if (ct != NULL) { delete ct; } ct = new CountTable(); @@ -475,17 +481,12 @@ int TreeGroupCommand::execute(){ nameMap.insert(bin); gps.insert(bin); groupMap[bin] = bin; + m->Treenames.push_back(bin); } ct->createTable(nameMap, groupMap, gps); vector namesGroups = ct->getNamesOfGroups(); m->setGroups(namesGroups); - - //clear globaldatas old tree names if any - m->Treenames.clear(); - - //fills globaldatas tree names - m->Treenames = m->getGroups(); //used in tree constructor m->runParse = false;