]> git.donarmstrong.com Git - mothur.git/blobdiff - countseqscommand.cpp
removing chime source files from mother project.
[mothur.git] / countseqscommand.cpp
index 0d8ddf5440c324b3d7fa12cc4cff92aef4996b3b..e83c6035731aa5509655dcd25a7a45995c1a0004 100644 (file)
@@ -157,7 +157,8 @@ int CountSeqsCommand::execute(){
                        
                        //make sure groups are valid. takes care of user setting groupNames that are invalid or setting groups=all
                        SharedUtil* util = new SharedUtil();
-                       util->setGroups(Groups, groupMap->namesOfGroups);
+                       vector<string> nameGroups = groupMap->getNamesOfGroups();
+                       util->setGroups(Groups, nameGroups);
                        delete util;
                        
                        //sort groupNames so that the group title match the counts below, this is needed because the map object automatically sorts
@@ -173,7 +174,8 @@ int CountSeqsCommand::execute(){
                //open input file
                ifstream in;
                m->openInputFile(namefile, in);
-               
+        
+               int total = 0;
                while (!in.eof()) {
                        if (m->control_pressed) { break; }
                        
@@ -216,7 +218,7 @@ int CountSeqsCommand::execute(){
                                out << firstCol << '\t' << names.size() << endl;
                        }
                        
-                       
+                       total += names.size();
                }
                in.close();
                
@@ -224,6 +226,8 @@ int CountSeqsCommand::execute(){
                
                if (m->control_pressed) { m->mothurRemove(outputFileName); return 0; }
                
+        m->mothurOutEndLine();
+               m->mothurOut("Total number of sequences: " + toString(total)); m->mothurOutEndLine();
                m->mothurOutEndLine();
                m->mothurOut("Output File Name: "); m->mothurOutEndLine();
                m->mothurOut(outputFileName); m->mothurOutEndLine();