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;
//create search database and names vector
generateDatabaseAndNames(tfile, tempFile, method, ksize, 0.0, 0.0, 0.0, 0.0);
+ //prevents errors caused by creating shortcut files if you had an error in the sanity check.
+ if (m->control_pressed) { remove(phyloTreeName.c_str()); }
+
genusNodes = phyloTree->getGenusNodes();
genusTotals = phyloTree->getGenusTotals();
#ifdef USE_MPI
int pid, num, num2, processors;
- vector<long> positions;
- vector<long> positions2;
+ vector<unsigned long int> positions;
+ vector<unsigned long int> positions2;
MPI_Status status;
MPI_File inMPI;