X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=groupmap.h;h=8a1cfff6f660e0042f8a44784e8abff7864c5c2e;hb=8ef6687c1f586285d01c000cc5e359bf9c07c717;hp=54225e22a0ffab29c3ef7081aec8e75257d6d2d7;hpb=c5c3ba0fa9d18707c9c9ce692cff061b6f882e44;p=mothur.git diff --git a/groupmap.h b/groupmap.h index 54225e2..8a1cfff 100644 --- a/groupmap.h +++ b/groupmap.h @@ -10,6 +10,7 @@ */ #include "mothur.h" +#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. */ @@ -19,22 +20,26 @@ public: GroupMap() {}; GroupMap(string); ~GroupMap(); - void readMap(); + int 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. + map groupIndex; //groupname, vectorIndex in namesOfGroups. - used by collectdisplays and libshuff commands. int getNumSeqs() { return groupmap.size(); } + vector getNamesSeqs(); + 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