]> git.donarmstrong.com Git - mothur.git/blobdiff - matrixoutputcommand.cpp
added hcluster command and fixed some bugs, namely one with smart distancing.
[mothur.git] / matrixoutputcommand.cpp
index 6ccbf35d9affe9d0ab345018ba2165fe80d37dd8..5069e0f07684391033c7c1e2b7595dca9b18e30f 100644 (file)
@@ -196,7 +196,8 @@ int MatrixOutputCommand::execute(){
                        }
                        
                        if ((anyLabelsToProcess(lookup[0]->getLabel(), userLabels, "") == true) && (processedLabels.count(lastLabel) != 1)) {
-                       
+                               string saveLabel = lookup[0]->getLabel();
+                               
                                for (int i = 0; i < lookup.size(); i++) {  delete lookup[i];  } 
                                lookup = input->getSharedRAbundVectors(lastLabel);
 
@@ -205,6 +206,9 @@ int MatrixOutputCommand::execute(){
                                
                                processedLabels.insert(lookup[0]->getLabel());
                                userLabels.erase(lookup[0]->getLabel());
+                               
+                               //restore real lastlabel to save below
+                               lookup[0]->setLabel(saveLabel);
                        }
 
                        lastLabel = lookup[0]->getLabel();