try {
/************calculate the probablity that each word will be in a specific taxonomy*************/
- string phyloTreeName = tfile.substr(0,tfile.find_last_of(".")+1) + "tree.train";
- string probFileName = tfile.substr(0,tfile.find_last_of(".")+1) + tempFile.substr(0,tempFile.find_last_of(".")+1) + char('0'+ kmerSize) + "mer.prob";
- string probFileName2 = tfile.substr(0,tfile.find_last_of(".")+1) + tempFile.substr(0,tempFile.find_last_of(".")+1) + char('0'+ kmerSize) + "mer.numNonZero";
+ string tfileroot = tfile.substr(0,tfile.find_last_of(".")+1);
+ string tempfileroot = getRootName(getSimpleName(tempFile));
+ string phyloTreeName = tfileroot + "tree.train";
+ string probFileName = tfileroot + tempfileroot + char('0'+ kmerSize) + "mer.prob";
+ string probFileName2 = tfileroot + tempfileroot + char('0'+ kmerSize) + "mer.numNonZero";
ofstream out;
ofstream out2;
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);
//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
confidenceScores[newTax]++;
}
- newTax = taxonomy.parent;
- taxonomy = phyloTree->get(taxonomy.parent);
+ newTax = taxonomyTemp.parent;
+ taxonomyTemp = phyloTree->get(newTax);
}
}