MPI_Barrier(MPI_COMM_WORLD); //make everyone wait - just in case
#else
- ifstream in;
- m->openInputFile(tfile, in);
-
- //read in users taxonomy file and add sequences to tree
- while(!in.eof()){
- in >> name >> tax; m->gobble(in);
-
- addSeqToTree(name, tax);
- }
- in.close();
+ map<string, string> temp;
+ m->readTax(tfile, temp);
+
+ for (map<string, string>::iterator itTemp = temp.begin(); itTemp != temp.end();) {
+ addSeqToTree(itTemp->first, itTemp->second);
+ temp.erase(itTemp++);
+ }
#endif
assignHeirarchyIDs(0);
map<string, int>::iterator itFind;
map<string, int> taxonomyFileNames = name2Taxonomy;
+ if (m->debug) { m->mothurOut("[DEBUG]: in error check. Numseqs in template = " + toString(templateFileNames.size()) + ". Numseqs in taxonomy = " + toString(taxonomyFileNames.size()) + ".\n"); }
+
for (int i = 0; i < templateFileNames.size(); i++) {
itFind = taxonomyFileNames.find(templateFileNames[i]);
if (itFind != taxonomyFileNames.end()) { //found it so erase it
taxonomyFileNames.erase(itFind);
}else {
- m->mothurOut(templateFileNames[i] + " is in your template file and is not in your taxonomy file. Please correct."); m->mothurOutEndLine();
+ m->mothurOut("'" +templateFileNames[i] + "' is in your template file and is not in your taxonomy file. Please correct."); m->mothurOutEndLine();
okay = false;
}