]> git.donarmstrong.com Git - mothur.git/blobdiff - countgroupscommand.cpp
added forward and reverse barcodes to trim.seqs to process illumina seqs
[mothur.git] / countgroupscommand.cpp
index af9993c8ef6f8ee794be8bf7b3825aa34d1a44e7..0c03882a459135afaad797728f2ed268b17c9abb 100644 (file)
@@ -34,7 +34,7 @@ vector<string> CountGroupsCommand::setParameters(){
 string CountGroupsCommand::getHelpString(){    
        try {
                string helpString = "";
-               helpString += "The count.groups command counts sequences from a specfic group or set of groups from the following file types: group or shared file.\n";
+               helpString += "The count.groups command counts sequences from a specific group or set of groups from the following file types: group or shared file.\n";
                helpString += "The count.groups command parameters are accnos, group, shared and groups. You must provide a group or shared file.\n";
                helpString += "The accnos parameter allows you to provide a file containing the list of groups.\n";
                helpString += "The groups parameter allows you to specify which of the groups in your groupfile you would like.  You can separate group names with dashes.\n";
@@ -127,7 +127,7 @@ CountGroupsCommand::CountGroupsCommand(string option)  {
                        if (groups == "not found") { groups = ""; }
                        else {
                                m->splitAtDash(groups, Groups);
-                               m->Groups = Groups;
+                               m->setGroups(Groups);
                        }
                        
                        sharedfile = validParameter.validFile(parameters, "shared", true);
@@ -153,7 +153,7 @@ CountGroupsCommand::CountGroupsCommand(string option)  {
                                }
                        }
                        
-                       if ((accnosfile == "") && (Groups.size() == 0)) { Groups.push_back("all"); m->Groups = Groups; }
+                       if ((accnosfile == "") && (Groups.size() == 0)) { Groups.push_back("all"); m->setGroups(Groups); }
                }
                
        }
@@ -179,7 +179,8 @@ int CountGroupsCommand::execute(){
                        //make sure groups are valid
                        //takes care of user setting groupNames that are invalid or setting groups=all
                        SharedUtil util;
-                       util.setGroups(Groups, groupMap.namesOfGroups);
+                       vector<string> nameGroups = groupMap.getNamesOfGroups();
+                       util.setGroups(Groups, nameGroups);
                        
                        for (int i = 0; i < Groups.size(); i++) {
                                m->mothurOut(Groups[i] + " contains " + toString(groupMap.getNumSeqs(Groups[i])) + "."); m->mothurOutEndLine();
@@ -224,7 +225,7 @@ void CountGroupsCommand::readAccnos(){
                }
                in.close();             
                
-               m->Groups = Groups;
+               m->setGroups(Groups);
                
        }
        catch(exception& e) {