X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=treegroupscommand.cpp;h=753b5cbe3cf7f67ed623bb8d866b848c6c96e5be;hb=250e3b11b1c9c1e1ad458ab6c7e71ac2e67e11d9;hp=b793dc885ef9213f290f118be55066a0e2837086;hpb=01d5a60fc5f396339acf529151fa8186ee7c1a41;p=mothur.git diff --git a/treegroupscommand.cpp b/treegroupscommand.cpp index b793dc8..753b5cb 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, false); 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"); }