]> git.donarmstrong.com Git - mothur.git/blobdiff - subsample.cpp
adding labels to list file.
[mothur.git] / subsample.cpp
index a6b1b2d58da2daa5cc53d17d4bbb814b56921ffd..2eb1d497494849e316b58103f84a2c95a475a832 100644 (file)
@@ -24,7 +24,7 @@ Tree* SubSample::getSample(Tree* T, CountTable* ct, CountTable* newCt, int size)
         for (int i = 0; i < Groups.size(); i++) {
             if (m->inUsersGroups(Groups[i], m->getGroups())) {
                 if (m->control_pressed) { break; }
-                cout << Groups[i] << endl;
+        
                 int thisSize = ct->getGroupCount(Groups[i]);
                 
                 if (thisSize >= size) {        
@@ -108,7 +108,7 @@ vector<string> SubSample::getSample(vector<SharedRAbundVector*>& thislookup, int
        try {
                
                //save mothurOut's binLabels to restore for next label
-               vector<string> saveBinLabels = m->currentBinLabels;
+               vector<string> saveBinLabels = m->currentSharedBinLabels;
                
                int numBins = thislookup[0]->getNumBins();
                for (int i = 0; i < thislookup.size(); i++) {           
@@ -136,7 +136,7 @@ vector<string> SubSample::getSample(vector<SharedRAbundVector*>& thislookup, int
                                
                                for (int j = 0; j < size; j++) {
                                        
-                                       if (m->control_pressed) {  return m->currentBinLabels; }
+                                       if (m->control_pressed) {  return m->currentSharedBinLabels; }
                                        
                                        int bin = order.get(j);
                                        
@@ -149,11 +149,11 @@ vector<string> SubSample::getSample(vector<SharedRAbundVector*>& thislookup, int
                //subsampling may have created some otus with no sequences in them
                eliminateZeroOTUS(thislookup);
         
-               if (m->control_pressed) { return m->currentBinLabels; }
+               if (m->control_pressed) { return m->currentSharedBinLabels; }
                
                //save mothurOut's binLabels to restore for next label
-        vector<string> subsampleBinLabels = m->currentBinLabels;
-               m->currentBinLabels = saveBinLabels;
+        vector<string> subsampleBinLabels = m->currentSharedBinLabels;
+               m->currentSharedBinLabels = saveBinLabels;
                
                return subsampleBinLabels;
                
@@ -200,7 +200,7 @@ int SubSample::eliminateZeroOTUS(vector<SharedRAbundVector*>& thislookup) {
                                        for (int h = 0; h < diff; h++) { binLabel += "0"; }
                                }
                                binLabel += sbinNumber; 
-                               if (i < m->currentBinLabels.size()) {  binLabel = m->currentBinLabels[i]; }
+                               if (i < m->currentSharedBinLabels.size()) {  binLabel = m->currentSharedBinLabels[i]; }
                                
                                newBinLabels.push_back(binLabel);
                        }
@@ -210,7 +210,7 @@ int SubSample::eliminateZeroOTUS(vector<SharedRAbundVector*>& thislookup) {
                thislookup.clear();
                
                thislookup = newLookup;
-               m->currentBinLabels = newBinLabels;
+               m->currentSharedBinLabels = newBinLabels;
                
                return 0;