X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=classify.cpp;h=7726b3e00cca9de19971b70656f9581e43e97c8a;hb=ee8403d4eb5760187d62b42a9cf4272de8fc0ec4;hp=25aa2dd7b9f2f8a4f36030eebf0d3284f7d28b08;hpb=ba2b95b22ab8947d5583ca2c2da74557870b6861;p=mothur.git diff --git a/classify.cpp b/classify.cpp index 25aa2dd..7726b3e 100644 --- a/classify.cpp +++ b/classify.cpp @@ -238,7 +238,7 @@ void Classify::generateDatabaseAndNames(string tfile, string tempFile, string me } } /**************************************************************************************************/ -Classify::Classify() { m = MothurOut::getInstance(); database = NULL; } +Classify::Classify() { m = MothurOut::getInstance(); database = NULL; flipped=false; } /**************************************************************************************************/ int Classify::readTaxonomy(string file) { @@ -249,7 +249,8 @@ int Classify::readTaxonomy(string file) { m->mothurOutEndLine(); m->mothurOut("Reading in the " + file + " taxonomy...\t"); cout.flush(); - + if (m->debug) { m->mothurOut("[DEBUG]: Taxonomies read in...\n"); } + #ifdef USE_MPI int pid, num, processors; vector positions; @@ -296,7 +297,9 @@ int Classify::readTaxonomy(string file) { delete buf4; istringstream iss (tempBuf,istringstream::in); - iss >> name >> taxInfo; + iss >> name; m->gobble(iss); + iss >> taxInfo; + if (m->debug) { m->mothurOut("[DEBUG]: name = " + name + " tax = " + taxInfo + "\n"); } taxonomy[name] = taxInfo; phyloTree->addSeqToTree(name, taxInfo); } @@ -309,8 +312,11 @@ int Classify::readTaxonomy(string file) { //read template seqs and save while (!inTax.eof()) { - inTax >> name >> taxInfo; - + inTax >> name; m->gobble(inTax); + inTax >> taxInfo; + + if (m->debug) { m->mothurOut("[DEBUG]: name = '" + name + "' tax = '" + taxInfo + "'\n"); } + taxonomy[name] = taxInfo; phyloTree->addSeqToTree(name, taxInfo); @@ -319,6 +325,8 @@ int Classify::readTaxonomy(string file) { } inTax.close(); #endif + + phyloTree->assignHeirarchyIDs(0);