]> git.donarmstrong.com Git - mothur.git/blobdiff - collectsharedcommand.cpp
fixed bug in heatmap
[mothur.git] / collectsharedcommand.cpp
index 86b35a5191d268452d86a2994dd1bcafd06a3001..4a3a338944958aa8e9342661847898c20e598f3d 100644 (file)
@@ -142,8 +142,11 @@ int CollectSharedCommand::execute(){
                util->updateGroupIndex(globaldata->Groups, globaldata->gGroupmap->groupIndex);
 
                while(order != NULL){
+               
                        orderList.insert(order->getLabel());
+                       
                        if(globaldata->allLines == 1 || globaldata->lines.count(count) == 1 || globaldata->labels.count(order->getLabel()) == 1){
+                               
                                //create collectors curve
                                cCurve = new Collect(order, cDisplays);
                                convert(globaldata->getFreq(), freq);
@@ -155,6 +158,7 @@ int CollectSharedCommand::execute(){
                        }
                        
                        //get next line to process
+                       delete order;
                        order = input->getSharedOrderVector();
                        count++;
                }
@@ -162,6 +166,7 @@ int CollectSharedCommand::execute(){
                for(i = globaldata->labels.begin(); i != globaldata->labels.end(); ++i)
                        if(orderList.count(*i) == 0)
                                cout << "'" << *i << "'" << " is not a valid label.\n";
+                               
                for(int i=0;i<cDisplays.size();i++){    delete cDisplays[i];    }       
                
                //reset groups parameter