X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=treegroupscommand.cpp;h=80698f1b4b0317719421dbe9c4af3c0583bd9d97;hb=372fb21ea66ced432b109225851a1b80ef0491a3;hp=b793dc885ef9213f290f118be55066a0e2837086;hpb=7f1aca4ed9e6db70de82e80ca4771f7680b21d26;p=mothur.git diff --git a/treegroupscommand.cpp b/treegroupscommand.cpp index b793dc8..80698f1 100644 --- a/treegroupscommand.cpp +++ b/treegroupscommand.cpp @@ -458,7 +458,7 @@ int TreeGroupCommand::execute(){ readMatrix->read(nameMap); }else if (countfile != "") { ct = new CountTable(); - ct->readTable(countfile); + ct->readTable(countfile, true); readMatrix->read(ct); }else { readMatrix->read(nameMap); @@ -662,8 +662,18 @@ int TreeGroupCommand::makeSimsShared() { if (lookup.size() < 2) { m->mothurOut("You have not provided enough valid groups. I cannot run the command."); m->mothurOutEndLine(); m->control_pressed = true; return 0; } } - numGroups = lookup.size(); + + //sanity check to make sure processors < numComparisions + int numDists = 0; + for(int i=0;i processors) { break; } + } + } + if (numDists < processors) { processors = numDists; } + lines.resize(processors); for (int i = 0; i < processors; i++) { lines[i].start = int (sqrt(float(i)/float(processors)) * numGroups); @@ -918,6 +928,8 @@ int TreeGroupCommand::process(vector thisLookup) { thisItersLookup.clear(); for (int i = 0; i < calcDists.size(); i++) { calcDists[i].clear(); } } + + if (m->debug) { m->mothurOut("[DEBUG]: iter = " + toString(thisIter) + ".\n"); } } if (m->debug) { m->mothurOut("[DEBUG]: done with iters.\n"); }