X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=unifracweightedcommand.cpp;h=6d8f75ba9dc3a4edeca6a4430937cc476b886090;hb=ed04a159be4f1fab2850fa4dd2f40bf51e94e974;hp=91e898f658556d840aab261995ba285c96d84f9d;hpb=9daea1c357d32c6a7b34c5cbec122b7cfc5c92e3;p=mothur.git diff --git a/unifracweightedcommand.cpp b/unifracweightedcommand.cpp index 91e898f..6d8f75b 100644 --- a/unifracweightedcommand.cpp +++ b/unifracweightedcommand.cpp @@ -52,7 +52,6 @@ int UnifracWeightedCommand::execute() { weightedFile = globaldata->getTreeFile() + toString(i+1) + ".weighted"; weightedFileout = globaldata->getTreeFile() + "temp." + toString(i+1) + ".weighted"; - cout << "Processing tree " << i+1 << endl; userData = weighted->getValues(T[i]); //userData[0] = weightedscore //save users score @@ -175,8 +174,13 @@ void UnifracWeightedCommand::printWSummaryFile() { int count = 0; for (int i = 0; i < T.size(); i++) { for (int j = 0; j < numComp; j++) { - outSum << setprecision(globaldata->getIters().length()) << i+1 << '\t' << '\t' << groupComb[j] << '\t' << utreeScores[count] << '\t' << WScoreSig[count] << endl; - cout << setprecision(globaldata->getIters().length()) << i+1 << '\t' << '\t' << groupComb[j] << '\t' << utreeScores[count] << '\t' << WScoreSig[count] << endl; + if (WScoreSig[count] > (1/(float)iters)) { + outSum << setprecision(globaldata->getIters().length()) << i+1 << '\t' << '\t' << groupComb[j] << '\t' << utreeScores[count] << '\t' << WScoreSig[count] << endl; + cout << setprecision(globaldata->getIters().length()) << i+1 << '\t' << '\t' << groupComb[j] << '\t' << utreeScores[count] << '\t' << WScoreSig[count] << endl; + }else{ + outSum << setprecision(globaldata->getIters().length()) << i+1 << '\t' << '\t' << groupComb[j] << '\t' << utreeScores[count] << '\t' << "<" << (1/float(iters)) << endl; + cout << setprecision(globaldata->getIters().length()) << i+1 << '\t' << '\t' << groupComb[j] << '\t' << utreeScores[count] << '\t' << "<" << (1/float(iters)) << endl; + } count++; } } @@ -261,7 +265,7 @@ void UnifracWeightedCommand::setGroups() { numComp += i; for (int l = i+1; l < numGroups; l++) { //set group comparison labels - groupComb.push_back(globaldata->Groups[i]+globaldata->Groups[l]); + groupComb.push_back(globaldata->Groups[i] + "-" + globaldata->Groups[l]); } } }