X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=countgroupscommand.cpp;h=ccf8988e39308fd2816f6eb0a6ff0454ab944d19;hb=ccae9eef0b44f2d63fdf4a707d0d40243aa1b990;hp=24b4214dd5600ef0f0625ba7acf0da2a8f328108;hpb=55386dddad84cc1140d736cabaf4dd0ae16f2e01;p=mothur.git diff --git a/countgroupscommand.cpp b/countgroupscommand.cpp index 24b4214..ccf8988 100644 --- a/countgroupscommand.cpp +++ b/countgroupscommand.cpp @@ -34,7 +34,7 @@ vector 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"; @@ -170,7 +170,7 @@ int CountGroupsCommand::execute(){ if (abort == true) { if (calledHelp) { return 0; } return 2; } //get groups you want to remove - if (accnosfile != "") { readAccnos(); } + if (accnosfile != "") { m->readAccnos(accnosfile, Groups); m->setGroups(Groups); } if (groupfile != "") { GroupMap groupMap(groupfile); @@ -208,31 +208,5 @@ int CountGroupsCommand::execute(){ } } //********************************************************************************************************************** -void CountGroupsCommand::readAccnos(){ - try { - Groups.clear(); - - ifstream in; - m->openInputFile(accnosfile, in); - string name; - - while(!in.eof()){ - in >> name; - - Groups.push_back(name); - - m->gobble(in); - } - in.close(); - - m->setGroups(Groups); - - } - catch(exception& e) { - m->errorOut(e, "CountGroupsCommand", "readAccnos"); - exit(1); - } -} -//**********************************************************************************************************************