X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=unifracweightedcommand.cpp;h=3b3abf82db928f25bb07a7e3dfdf04f4228a35dd;hb=5e8fcd2454ba4bd2e11983afd682b8aa6f7bb5c2;hp=4a8325afda1cf2ea95d3aa19ce228e9f4451cc96;hpb=46379d9bce0f4ba9433689d4828ef5a4aa78dfb5;p=mothur.git diff --git a/unifracweightedcommand.cpp b/unifracweightedcommand.cpp index 4a8325a..3b3abf8 100644 --- a/unifracweightedcommand.cpp +++ b/unifracweightedcommand.cpp @@ -122,7 +122,7 @@ int UnifracWeightedCommand::execute() { //copy T[i]'s info. randT->getCopy(T[i]); - //get pscores for random trees + //get scores for random trees for (int j = 0; j < iters; j++) { //create a random tree with same topology as T[i], but different labels randT->assembleRandomUnifracTree(); @@ -178,7 +178,7 @@ int UnifracWeightedCommand::execute() { float ucumul = 0.0000; float rcumul = 0.0000; //this loop fills the cumulative maps and put 0.0000 in the score freq map to make it easier to print. - for (it = validScores[b].begin(); it != validScores[b].end(); it++) { + for (it = validScores[b].end(); it == validScores[b].begin(); it--) { it2 = uscoreFreq[b].find(it->first); //user data has that score if (it2 != uscoreFreq[b].end()) { uscoreFreq[b][it->first] /= T.size(); ucumul+= it2->second; }