X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=groupmap.h;h=bdcd61e7c763cc10e31088d3292064887a8070a8;hp=99891a46c5cf998c565bffb8012350ebedacc8fa;hb=a8e2df1b96a57f5f29576b08361b86a96a8eff4f;hpb=55386dddad84cc1140d736cabaf4dd0ae16f2e01 diff --git a/groupmap.h b/groupmap.h index 99891a4..bdcd61e 100644 --- a/groupmap.h +++ b/groupmap.h @@ -2,7 +2,7 @@ #define GROUPMAP_H /* * groupmap.h - * Dotur + * Mothur * * Created by Sarah Westcott on 12/1/08. * Copyright 2008 Schloss Lab UMASS Amherst. All rights reserved. @@ -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