]> git.donarmstrong.com Git - mothur.git/blobdiff - consensusseqscommand.cpp
fix to summary.tax for 1.28.0
[mothur.git] / consensusseqscommand.cpp
index 4c7aefb340602efffa969b2612568299cbf1865b..36df8c043086552dee3c85d120f5dc1d70a71159 100644 (file)
@@ -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<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