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; }
}
//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