X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=countgroupscommand.cpp;fp=countgroupscommand.cpp;h=24b4214dd5600ef0f0625ba7acf0da2a8f328108;hb=55386dddad84cc1140d736cabaf4dd0ae16f2e01;hp=af9993c8ef6f8ee794be8bf7b3825aa34d1a44e7;hpb=990ded2eb38078a417fa00b4fbb4d3c24f4b5046;p=mothur.git diff --git a/countgroupscommand.cpp b/countgroupscommand.cpp index af9993c..24b4214 100644 --- a/countgroupscommand.cpp +++ b/countgroupscommand.cpp @@ -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 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) {