X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=countgroupscommand.cpp;h=ccf8988e39308fd2816f6eb0a6ff0454ab944d19;hb=96dbe925073caefaed6e6db85659c144a806aeb1;hp=0c03882a459135afaad797728f2ed268b17c9abb;hpb=0caf3fbabaa3ece404f8ce77f4c883dc5b1bf1dc;p=mothur.git diff --git a/countgroupscommand.cpp b/countgroupscommand.cpp index 0c03882..ccf8988 100644 --- a/countgroupscommand.cpp +++ b/countgroupscommand.cpp @@ -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); - } -} -//**********************************************************************************************************************