]> git.donarmstrong.com Git - mothur.git/blobdiff - phylosummary.cpp
made get.oturep more memory efficient by breaking the work into 2 pieces.
[mothur.git] / phylosummary.cpp
index 1e8d1bc6c6b2497b85838aeebd4c31c30104a70d..915a05ff74a14e7fac2a32da119c184ee9908293 100644 (file)
@@ -126,9 +126,9 @@ int PhyloSummary::addSeqToTree(string seqName, string seqTaxonomy){
                                tree[currentNode].total++;
 
                                currentNode = childPointer->second;
-                       }else{                                                                                  //otherwise, create it
-                               m->mothurOut("Error: cannot find taxonomy in tree for " + seqName + "."); m->mothurOutEndLine();
-                               seqTaxonomy = "";
+                       }else{  //otherwise, error
+                               m->mothurOut("Warning: cannot find taxon " + taxon + " in reference taxonomy tree at level " + toString(tree[currentNode].level) + " for " + seqName + ". This may cause totals of daughter levels not to add up in summary file."); m->mothurOutEndLine();
+                               break;
                        }
                        
                        level++;
@@ -168,7 +168,7 @@ void PhyloSummary::assignRank(int index){
 void PhyloSummary::print(ofstream& out){
        try {
                //print labels
-               out << "taxlevel\t rank ID\t label\t daughterlevels\t total\t";
+               out << "taxlevel\t rankID\t taxon\t daughterlevels\t total\t";
                if (groupmap != NULL) {
                        for (int i = 0; i < groupmap->namesOfGroups.size(); i++) {
                                out << groupmap->namesOfGroups[i] << '\t';