]> git.donarmstrong.com Git - mothur.git/blobdiff - phylosummary.cpp
changed groupfile in classify.seqs to reflect multiple fasta files
[mothur.git] / phylosummary.cpp
index a5f67c082945a9955feb2897e16b242d60533ffa..5612d7bbf3eded6f86bcdce40c45048ee8edcb25 100644 (file)
@@ -114,6 +114,8 @@ int PhyloSummary::addSeqToTree(string seqName, string seqTaxonomy){
                                        //find out the sequences group
                                        string group = groupmap->getGroup(seqName);
                                        
+                                       if (group == "not found") {  m->mothurOut(seqName + " is not in your groupfile, and will be included in the overall total, but not any group total."); m->mothurOutEndLine();  }
+                                       
                                        //do you have a count for this group?
                                        map<string, int>::iterator itGroup = tree[currentNode].groupCount.find(group);
                                        
@@ -128,7 +130,7 @@ int PhyloSummary::addSeqToTree(string seqName, string seqTaxonomy){
                                currentNode = childPointer->second;
                        }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();
-                               seqTaxonomy = "";
+                               break;
                        }
                        
                        level++;
@@ -168,7 +170,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';