]> git.donarmstrong.com Git - mothur.git/blobdiff - collectcommand.cpp
added get.rabund and get.sabund command and fixed bug introduced by line by line...
[mothur.git] / collectcommand.cpp
index 01f2fff68b93596a52fc60703bce790559b0fbec..3d7f1b0fead598d628491f6214ed3701bd65edea 100644 (file)
@@ -133,8 +133,9 @@ int CollectCommand::execute(){
                //if the users enters label "0.06" and there is no "0.06" in their file use the next lowest label.
                set<string> processedLabels;
                set<string> userLabels = globaldata->labels;
+               set<int> userLines = globaldata->lines;
                
-               while((order != NULL) && ((globaldata->allLines == 1) || (userLabels.size() != 0))) {
+               while((order != NULL) && ((globaldata->allLines == 1) || (userLabels.size() != 0) || (userLines.size() != 0))) {
                
                        if(globaldata->allLines == 1 || globaldata->lines.count(count) == 1 || globaldata->labels.count(order->getLabel()) == 1){
                                
@@ -145,6 +146,7 @@ int CollectCommand::execute(){
                                cout << order->getLabel() << '\t' << count << endl;
                                processedLabels.insert(order->getLabel());
                                userLabels.erase(order->getLabel());
+                               userLines.erase(count);
                        
                        //you have a label the user want that is smaller than this line and the last line has not already been processed 
                        }