X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=consensusseqscommand.cpp;h=36df8c043086552dee3c85d120f5dc1d70a71159;hb=16f9c4ab6f39769856b13e048eae2c8eaa413c02;hp=4c7aefb340602efffa969b2612568299cbf1865b;hpb=6c2b1e530a5c0bb87040e58a3e410097acdfcc3d;p=mothur.git diff --git a/consensusseqscommand.cpp b/consensusseqscommand.cpp index 4c7aefb..36df8c0 100644 --- a/consensusseqscommand.cpp +++ b/consensusseqscommand.cpp @@ -66,7 +66,7 @@ string ConsensusSeqsCommand::getOutputFileNameTag(string type, string inputName= else { if (type == "fasta") { outputFileName = "cons.fasta"; } else if (type == "name") { outputFileName = "cons.names"; } - else if (type == "count") { outputFileName = "cons.count.table"; } + else if (type == "count") { outputFileName = "cons.count_table"; } else if (type == "summary") { outputFileName = "cons.summary"; } else { m->mothurOut("[ERROR]: No definition for type " + type + " output file tag.\n"); m->control_pressed = true; } } @@ -610,10 +610,10 @@ char ConsensusSeqsCommand::getBase(vector counts, int size){ //A,T,G,C,Gap //zero out counts that don't make the cutoff float percentage = (100.0 - cutoff) / 100.0; - int zeroCutoff = percentage * size; - + for (int i = 0; i < counts.size(); i++) { - if (counts[i] < zeroCutoff) { counts[i] = 0; } + float countPercentage = counts[i] / (float) size; + if (countPercentage < percentage) { counts[i] = 0; } } //any