X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=bayesian.cpp;h=b46f7703a971b8b5141d42faf14e26d45037cba0;hb=1f78a8c454a636f19b4711bd52782ea1e3e81d3d;hp=57b8e20def801dffdf90f7e49d061d90d8c7a576;hpb=8ab46c171b45ae3782d839539792d049017a361b;p=mothur.git diff --git a/bayesian.cpp b/bayesian.cpp index 57b8e20..b46f770 100644 --- a/bayesian.cpp +++ b/bayesian.cpp @@ -17,9 +17,11 @@ Classify(), kmerSize(ksize), confidenceThreshold(cutoff), iters(i) { 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;