]> git.donarmstrong.com Git - mothur.git/blobdiff - consensusseqscommand.cpp
added sets to amova and homova commands. added oligos to make.contigs. added metadat...
[mothur.git] / consensusseqscommand.cpp
index 94d66827068338c9b254f8e3aa30d9ec65301db9..36df8c043086552dee3c85d120f5dc1d70a71159 100644 (file)
@@ -610,10 +610,10 @@ char ConsensusSeqsCommand::getBase(vector<int> 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