X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=groupmap.h;h=54085a19bab041d0caf17981c8c6c81f05a0c8b9;hb=15cde0905641f8adddc1cc704f8c064f760e7461;hp=20048a59a5f5aaa3658dd5697f26e3f255a978e1;hpb=7e0cf6431e287072c40b2c10c9e08199fce29ef4;p=mothur.git diff --git a/groupmap.h b/groupmap.h index 20048a5..54085a1 100644 --- a/groupmap.h +++ b/groupmap.h @@ -10,7 +10,7 @@ */ #include "mothur.h" -#include "utilities.hpp" +#include "mothurout.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. */ @@ -20,21 +20,28 @@ public: GroupMap() {}; GroupMap(string); ~GroupMap(); - void readMap(); + int readMap(); + int readDesignMap(); 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. - + map groupIndex; //groupname, vectorIndex in namesOfGroups. - used by collectdisplays and libshuff commands. + int getNumSeqs() { return groupmap.size(); } + vector getNamesSeqs(); + vector getNamesSeqs(vector); //get names of seqs belonging to a group or set of groups + int getNumSeqs(string); //return the number of seqs in a given group + private: + MothurOut* m; ifstream fileHandle; string groupFileName; int index; map::iterator it; void setNamesOfGroups(string); map groupmap; //sequence name and groupname + map seqsPerGroup; //maps groupname to number of seqs in that group }; #endif