]> git.donarmstrong.com Git - mothur.git/blobdiff - groupmap.h
added multiple processors option for Windows users to align.seqs, dist.seqs, summary...
[mothur.git] / groupmap.h
index 54085a19bab041d0caf17981c8c6c81f05a0c8b9..99891a46c5cf998c565bffb8012350ebedacc8fa 100644 (file)
@@ -26,7 +26,13 @@ public:
        bool isValidGroup(string);  //return true if string is a valid group
        string getGroup(string);
        void setGroup(string, string);
-       vector<string> namesOfGroups;
+       vector<string> getNamesOfGroups() {
+               sort(namesOfGroups.begin(), namesOfGroups.end());
+               groupIndex.clear();
+               for (int i = 0; i < namesOfGroups.size(); i++) { groupIndex[namesOfGroups[i]] = i; }
+               return namesOfGroups;
+       }
+       void setNamesOfGroups(vector<string> sn) { namesOfGroups = sn; }
        map<string, int> groupIndex;  //groupname, vectorIndex in namesOfGroups. - used by collectdisplays and libshuff commands.
        int getNumSeqs()  {  return groupmap.size();  }
        vector<string> getNamesSeqs();
@@ -34,6 +40,7 @@ public:
        int getNumSeqs(string); //return the number of seqs in a given group
                        
 private:
+       vector<string> namesOfGroups;
        MothurOut* m;
        ifstream fileHandle;
        string groupFileName;