X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=consensusseqscommand.cpp;h=36df8c043086552dee3c85d120f5dc1d70a71159;hb=006601d68abe8d0061f77e8d28323b160750e343;hp=94d66827068338c9b254f8e3aa30d9ec65301db9;hpb=90708fe9701e3827e477c82fb3652539c3bf2a0d;p=mothur.git diff --git a/consensusseqscommand.cpp b/consensusseqscommand.cpp index 94d6682..36df8c0 100644 --- a/consensusseqscommand.cpp +++ b/consensusseqscommand.cpp @@ -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