- genusNodes = phyloTree->getGenusNodes();
- genusTotals = phyloTree->getGenusTotals();
-
- m->mothurOut("Calculating template taxonomy tree... "); cout.flush();
-
- phyloTree->printTreeNodes(phyloTreeName);
-
- m->mothurOut("DONE."); m->mothurOutEndLine();
-
- m->mothurOut("Calculating template probabilities... "); cout.flush();
-
- numKmers = database->getMaxKmer() + 1;
-
- //initialze probabilities
- wordGenusProb.resize(numKmers);
-
- for (int j = 0; j < wordGenusProb.size(); j++) { wordGenusProb[j].resize(genusNodes.size()); }
-
-
- #ifdef USE_MPI
- int pid;
- MPI_Comm_rank(MPI_COMM_WORLD, &pid); //find out who we are
-
- if (pid == 0) {
- #endif
-
- ofstream out;
- openOutputFile(probFileName, out);
-
- out << numKmers << endl;
-
- ofstream out2;
- openOutputFile(probFileName2, out2);
+ //prevents errors caused by creating shortcut files if you had an error in the sanity check.
+ if (m->control_pressed) { remove(phyloTreeName.c_str()); remove(probFileName.c_str()); remove(probFileName2.c_str()); }
+ else{
+ genusNodes = phyloTree->getGenusNodes();
+ genusTotals = phyloTree->getGenusTotals();
+
+ m->mothurOut("Calculating template taxonomy tree... "); cout.flush();
+
+ phyloTree->printTreeNodes(phyloTreeName);
+
+ m->mothurOut("DONE."); m->mothurOutEndLine();
+
+ m->mothurOut("Calculating template probabilities... "); cout.flush();
+
+ numKmers = database->getMaxKmer() + 1;