]> git.donarmstrong.com Git - mothur.git/blobdiff - phylotree.cpp
added load.logfile command. changed summary.single output for subsample=t.
[mothur.git] / phylotree.cpp
index 4ed3d8c1c02e1c5a1ee93b9dd6143309f5606f5c..3dde18680c625eb816230a8d13774ccfc47032cf 100644 (file)
@@ -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<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);