X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=unifracunweightedcommand.cpp;h=db5cf90cf56ad18ad1f5fd80cb6ee5b79c1aaa32;hp=dbdee2ad942db51860cb0a7f403662a895def1bf;hb=e98d56be8369a799e61a411bc13d3bd1fa3451e5;hpb=0caf3fbabaa3ece404f8ce77f4c883dc5b1bf1dc diff --git a/unifracunweightedcommand.cpp b/unifracunweightedcommand.cpp index dbdee2a..db5cf90 100644 --- a/unifracunweightedcommand.cpp +++ b/unifracunweightedcommand.cpp @@ -245,6 +245,7 @@ int UnifracUnweightedCommand::execute() { T = reader->getTrees(); tmap = T[0]->getTreeMap(); map nameMap = reader->getNames(); + map unique2Dup = reader->getNameMap(); delete reader; sumFile = outputDir + m->getSimpleName(treefile) + ".uwsummary"; @@ -281,7 +282,7 @@ int UnifracUnweightedCommand::execute() { int thisSize = thisGroupsSeqs.size(); if (thisSize >= subsampleSize) { Groups.push_back(newGroups[i]); } - else { m->mothurOut("You have selected a size that is larger than "+newGroups[i]+" number of sequences, removing "+newGroups[i]+".\n"); } + else { m->mothurOut("You have selected a size that is larger than "+newGroups[i]+" number of sequences, removing "+newGroups[i]+".\n"); } } m->setGroups(Groups); } @@ -305,7 +306,7 @@ int UnifracUnweightedCommand::execute() { for (int i = 0; i < T.size(); i++) { if (m->control_pressed) { delete tmap; for (int i = 0; i < T.size(); i++) { delete T[i]; }outSum.close(); for (int i = 0; i < outputNames.size(); i++) { m->mothurRemove(outputNames[i]); } return 0; } - counter = 0; + counter = 0; if (random) { output = new ColumnFile(outputDir + m->getSimpleName(treefile) + toString(i+1) + ".unweighted", itersString); @@ -354,6 +355,11 @@ int UnifracUnweightedCommand::execute() { SubSample sample; Tree* subSampleTree = sample.getSample(T[i], newTmap, nameMap, subsampleSize); + //uses method of setting groups to doNotIncludeMe + //SubSample sample; + //Tree* newTree2 = sample.getSample(T[i], newTmap, nameMap, subsampleSize, unique2Dup); + // newTree2->print(cout); + //call new weighted function vector iterData; iterData.resize(numComp,0); Unweighted thisUnweighted(includeRoot);