X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=unifracweightedcommand.cpp;h=1df79888eb8bdacb442b9dc2c89c51a7d4fa75ff;hb=e0ce7cbc93d7d2fbb753ca694182db092a0ea0e7;hp=633cb643a213044e4f7e92c108ad012690deff09;hpb=0caf3fbabaa3ece404f8ce77f4c883dc5b1bf1dc;p=mothur.git diff --git a/unifracweightedcommand.cpp b/unifracweightedcommand.cpp index 633cb64..1df7988 100644 --- a/unifracweightedcommand.cpp +++ b/unifracweightedcommand.cpp @@ -237,6 +237,7 @@ int UnifracWeightedCommand::execute() { T = reader->getTrees(); tmap = T[0]->getTreeMap(); map nameMap = reader->getNames(); + map unique2Dup = reader->getNameMap(); delete reader; if (m->control_pressed) { delete tmap; for (int i = 0; i < T.size(); i++) { delete T[i]; } return 0; } @@ -336,11 +337,15 @@ int UnifracWeightedCommand::execute() { //copy to preserve old one - would do this in subsample but memory cleanup becomes messy. TreeMap* newTmap = new TreeMap(); - newTmap->getCopy(*tmap); + //newTmap->getCopy(*tmap); + //SubSample sample; + //Tree* subSampleTree = sample.getSample(T[i], newTmap, nameMap, subsampleSize); + + //uses method of setting groups to doNotIncludeMe SubSample sample; - Tree* subSampleTree = sample.getSample(T[i], newTmap, nameMap, subsampleSize); - + Tree* subSampleTree = sample.getSample(T[i], tmap, newTmap, subsampleSize, unique2Dup); + //call new weighted function vector iterData; iterData.resize(numComp,0); Weighted thisWeighted(includeRoot);