X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=getcoremicrobiomcommand.cpp;h=e089f1dc386925aed7f2ef03925ef572375ff14e;hb=8a0b2fd6644dee848b262fcdea73b912a6054fed;hp=253e836ab4d2a378d51984ffe81a4264002788d2;hpb=4f3d46bdb42c23468a534486fd105180b030fc65;p=mothur.git diff --git a/getcoremicrobiomcommand.cpp b/getcoremicrobiomcommand.cpp index 253e836..e089f1d 100644 --- a/getcoremicrobiomcommand.cpp +++ b/getcoremicrobiomcommand.cpp @@ -284,15 +284,13 @@ int GetCoreMicroBiomCommand::createTable(vector& looku for (int j = 0; j < lookup.size(); j++) { double relabund = lookup[j]->getAbundance(i); int wholeRelabund = (int) (floor(relabund*100)); - cout << i << '\t' << j << '\t' << relabund << '\t' << wholeRelabund << endl; - for (int k = 0; k < wholeRelabund; k++) { counts[k]++; } + for (int k = 0; k < wholeRelabund+1; k++) { counts[k]++; } } //add this otus info to table for (int j = 0; j < table.size(); j++) { for (int k = 0; k < counts[j]; k++) { table[j][k]++; } } - } //format output @@ -301,7 +299,7 @@ int GetCoreMicroBiomCommand::createTable(vector& looku //convert table counts to percents for (int i = 0; i < table.size(); i++) { - out << "Relabund-" << i << '\t'; + out << "Relabund-" << i << "%\t"; if (m->control_pressed) { break; } for (int j = 0; j < table[i].size(); j++) { table[i][j] /= (double) numOtus; } }