X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=phylotree.cpp;h=3dde18680c625eb816230a8d13774ccfc47032cf;hb=49d2b7459c5027557564b21e9487dadafbbbdc96;hp=4ed3d8c1c02e1c5a1ee93b9dd6143309f5606f5c;hpb=01f6af90c907264686304a5c684c702e94ff40ae;p=mothur.git diff --git a/phylotree.cpp b/phylotree.cpp index 4ed3d8c..3dde186 100644 --- a/phylotree.cpp +++ b/phylotree.cpp @@ -178,16 +178,13 @@ PhyloTree::PhyloTree(string tfile){ 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 temp; + m->readTax(tfile, temp); + + for (map::iterator itTemp = temp.begin(); itTemp != temp.end();) { + addSeqToTree(itTemp->first, itTemp->second); + temp.erase(itTemp++); + } #endif assignHeirarchyIDs(0);