X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=bayesian.cpp;h=57b8e20def801dffdf90f7e49d061d90d8c7a576;hb=62568a297aaf939ab753334f17abde82ec8e8531;hp=63f8716dc0ee4fd243a21c06dd41c30f648228c9;hpb=b8f3e71c8a0310e25261464d27e6fcfe891483b0;p=mothur.git diff --git a/bayesian.cpp b/bayesian.cpp index 63f8716..57b8e20 100644 --- a/bayesian.cpp +++ b/bayesian.cpp @@ -213,7 +213,7 @@ string Bayesian::getTaxonomy(Sequence* seq) { int index = getMostProbableTaxonomy(queryKmers); if (m->control_pressed) { return tax; } - +//cout << seq->getName() << '\t' << index << endl; //bootstrap - to set confidenceScore int numToSelect = queryKmers.size() / 8; tax = bootstrapResults(queryKmers, index, numToSelect); @@ -249,10 +249,10 @@ string Bayesian::bootstrapResults(vector kmers, int tax, int numToSelect) { //get taxonomy int newTax = getMostProbableTaxonomy(temp); - TaxNode taxonomy = phyloTree->get(newTax); - + TaxNode taxonomyTemp = phyloTree->get(newTax); + //add to confidence results - while (taxonomy.level != 0) { //while you are not at the root + while (taxonomyTemp.level != 0) { //while you are not at the root itBoot2 = confidenceScores.find(newTax); //is this a classification we already have a count on @@ -262,8 +262,8 @@ string Bayesian::bootstrapResults(vector kmers, int tax, int numToSelect) { confidenceScores[newTax]++; } - newTax = taxonomy.parent; - taxonomy = phyloTree->get(taxonomy.parent); + newTax = taxonomyTemp.parent; + taxonomyTemp = phyloTree->get(newTax); } }