]> git.donarmstrong.com Git - mothur.git/blobdiff - groupmap.h
added MPI code, broke up chimera.seqs into 5 separated commands, added parse.sff...
[mothur.git] / groupmap.h
index e52ada56056e14cf8df6f4a2b7e541d7c8b1fcc7..8a1cfff6f660e0042f8a44784e8abff7864c5c2e 100644 (file)
@@ -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,23 +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<string> namesOfGroups;
-       map<string, int> groupIndex;  //groupname, vectorIndex in namesOfGroups. - used by collectdisplays.
+       map<string, int> groupIndex;  //groupname, vectorIndex in namesOfGroups. - used by collectdisplays and libshuff commands.
        int getNumSeqs()  {  return groupmap.size();  }
        vector<string> getNamesSeqs();
+       int getNumSeqs(string); //return the number of seqs in a given group
                        
 private:
+       MothurOut* m;
        ifstream fileHandle;
        string groupFileName;
        int index;
        map<string, string>::iterator it;
        void setNamesOfGroups(string); 
        map<string, string> groupmap; //sequence name and groupname
+       map<string, int> seqsPerGroup;  //maps groupname to number of seqs in that group
 };
 
 #endif