]> git.donarmstrong.com Git - mothur.git/blobdiff - phylotree.cpp
working on adding subsampling to dist.shared. fixed bug in phylotype command related...
[mothur.git] / phylotree.cpp
index dba1e3b56951f8ae1c484ace22187a9b65053d35..a9ef6cb0d85f44bde915606eb452db993ec40d8d 100644 (file)
@@ -128,8 +128,6 @@ PhyloTree::PhyloTree(string tfile){
                maxLevel = 0;
                calcTotals = true;
                string name, tax;
-               addSeqToTree("unknown", "unknown;");
-
                
                #ifdef USE_MPI
                        int pid, num, processors;
@@ -193,7 +191,16 @@ PhyloTree::PhyloTree(string tfile){
                #endif
        
                assignHeirarchyIDs(0);
-       
+        
+        
+        string unknownTax = "unknown;";
+        //added last taxon until you get desired level
+               for (int i = 1; i < maxLevel; i++) {
+                       unknownTax += "unclassfied;";
+               }
+        
+        addSeqToTree("unknown", unknownTax);
+        
                //create file for summary if needed
                setUp(tfile);
        }