X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=groupmap.h;h=bdcd61e7c763cc10e31088d3292064887a8070a8;hb=bd27c2b0612942815b7417c79f7ee41f669a2a34;hp=29c174134eee5689e5210775dbde2f220010d551;hpb=0caf3fbabaa3ece404f8ce77f4c883dc5b1bf1dc;p=mothur.git diff --git a/groupmap.h b/groupmap.h index 29c1741..bdcd61e 100644 --- a/groupmap.h +++ b/groupmap.h @@ -17,11 +17,13 @@ class GroupMap { public: - GroupMap() {}; + GroupMap() { m = MothurOut::getInstance(); } GroupMap(string); ~GroupMap(); int readMap(); + int readMap(string); int readDesignMap(); + int readDesignMap(string); int getNumGroups(); bool isValidGroup(string); //return true if string is a valid group string getGroup(string); @@ -32,19 +34,22 @@ public: for (int i = 0; i < namesOfGroups.size(); i++) { groupIndex[namesOfGroups[i]] = i; } return namesOfGroups; } + vector getNamesSeqs(); void setNamesOfGroups(vector sn) { namesOfGroups = sn; } - 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 - + int getCopy(GroupMap*); + + + map groupIndex; //groupname, vectorIndex in namesOfGroups. - used by collectdisplays and libshuff commands. + private: vector namesOfGroups; MothurOut* m; ifstream fileHandle; string groupFileName; - int index; + int index; map::iterator it; void setNamesOfGroups(string); map groupmap; //sequence name and groupname