X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=parsimonycommand.cpp;h=a527a18d28e8ef8613f39c3ce2d2da6b177f3af5;hb=fc7cf3aac8fd6106fd725b43baa8ab5ca6f836f8;hp=c40dde0c86c323560c850348940530293a1f6659;hpb=cfeefe1f7d36e9ffd3fba5f2f2b906724393e442;p=mothur.git diff --git a/parsimonycommand.cpp b/parsimonycommand.cpp index c40dde0..a527a18 100644 --- a/parsimonycommand.cpp +++ b/parsimonycommand.cpp @@ -70,7 +70,6 @@ int ParsimonyCommand::execute() { //output scores for each combination for(int k = 0; k < numComp; k++) { - cout << "Tree " << i+1 << " Combination " << groupComb[k] << " parsimony score = " << userData[k] << endl; //update uscoreFreq it = uscoreFreq[k].find(userData[k]); if (it == uscoreFreq[k].end()) {//new score @@ -166,10 +165,10 @@ int ParsimonyCommand::execute() { } printParsimonyFile(); - if (randomtree != "") { printUSummaryFile(); } + if (randomtree == "") { printUSummaryFile(); } //reset globaldata's treemap if you just did random distrib - if (randomtree == "") { globaldata->gTreemap = savetmap; } + if (randomtree != "") { globaldata->gTreemap = savetmap; } //reset randomTree parameter to "" globaldata->setRandomTree(""); @@ -238,6 +237,7 @@ void ParsimonyCommand::printUSummaryFile() { for (int i = 0; i< T.size(); i++) { for(int a = 0; a < numComp; a++) { outSum << setprecision(6) << i+1 << '\t' << groupComb[a] << '\t' << '\t' << userTreeScores[a][i] << '\t' << UScoreSig[a][i] << endl; + cout << setprecision(6) << i+1 << '\t' << groupComb[a] << '\t' << '\t' << userTreeScores[a][i] << '\t' << UScoreSig[a][i] << endl; } } @@ -357,8 +357,10 @@ void ParsimonyCommand::setGroups() { } //ABC - groupComb.push_back(allGroups); - numComp++; + if (numComp != 1) { + groupComb.push_back(allGroups); + numComp++; + } } catch(exception& e) {