Permalink
Browse files

Fixes segfault caused by no_consensus found

  • Loading branch information...
1 parent 9b6714e commit 1f886373b45f5ce59a501d32736c3b4b9c9f269b @mothur-westcott mothur-westcott committed Jul 11, 2016
Showing with 5 additions and 5 deletions.
  1. +1 −1 source/commands/aligncommand.cpp
  2. +4 −4 source/commands/classifyotucommand.cpp
@@ -347,7 +347,7 @@ int AlignCommand::execute(){
//delete accnos file if its blank else report to user
if (m->isBlank(accnosFileName)) { m->mothurRemove(accnosFileName); hasAccnos = false; }
else {
- m->mothurOut("Some of your sequences generated alignments that eliminated too many bases, a list is provided in " + accnosFileName + ".");
+ m->mothurOut("[WARNING]: Some of your sequences generated alignments that eliminated too many bases, a list is provided in " + accnosFileName + ".");
if (!flip) {
m->mothurOut(" If you set the flip parameter to true mothur will try aligning the reverse compliment as well.");
}else{ m->mothurOut(" If the reverse compliment proved to be better it was reported."); }
@@ -514,7 +514,7 @@ vector<string> ClassifyOtuCommand::findConsensusTaxonomy(vector<string> names, i
//is this taxonomy above cutoff
int consensusConfidence = ceil((bestChildSize / (float) size) * 100);
-
+
if (consensusConfidence >= cutoff) { //if yes, add it
if (probs) {
conTax += bestChild.name + "(" + toString(consensusConfidence) + ");";
@@ -529,10 +529,10 @@ vector<string> ClassifyOtuCommand::findConsensusTaxonomy(vector<string> names, i
//move down a level
currentNode = bestChild;
}
-
- if (myLevel != phylo->getMaxLevel()) { conTax = m->addUnclassifieds(conTax, phylo->getMaxLevel(), probs); }
- if (conTax == "") { conTax = "no_consensus;"; }
+ if (conTax == "") { conTax = "unknown;"; }
+
+ if (myLevel != phylo->getMaxLevel()) { conTax = m->addUnclassifieds(conTax, phylo->getMaxLevel(), probs); }
delete phylo;

0 comments on commit 1f88637

Please sign in to comment.