X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=groupmap.h;h=e52ada56056e14cf8df6f4a2b7e541d7c8b1fcc7;hb=462fca6d24fd15ca035358ff70bcfae52c3281c3;hp=a3b923cd4da60ce601c58d1553e2a95f6b9f4ab9;hpb=58cf1d08fee8c64334979075fa57bcafb035a2ed;p=mothur.git diff --git a/groupmap.h b/groupmap.h index a3b923c..e52ada5 100644 --- a/groupmap.h +++ b/groupmap.h @@ -9,28 +9,30 @@ * */ -#include -#include -#include -#include -#include "utilities.hpp" +#include "mothur.h" /* This class is a representation of the groupfile. It is used by all the shared commands to determine what group a certain sequence belongs to. */ class GroupMap { public: + GroupMap() {}; GroupMap(string); ~GroupMap(); void readMap(); int getNumGroups(); + bool isValidGroup(string); //return true if string is a valid group string getGroup(string); + void setGroup(string, string); vector namesOfGroups; - + map groupIndex; //groupname, vectorIndex in namesOfGroups. - used by collectdisplays. + int getNumSeqs() { return groupmap.size(); } + vector getNamesSeqs(); + private: ifstream fileHandle; string groupFileName; - int numGroups; + int index; map::iterator it; void setNamesOfGroups(string); map groupmap; //sequence name and groupname