]> git.donarmstrong.com Git - mothur.git/blobdiff - rarefactcommand.cpp
added get.rabund and get.sabund command and fixed bug introduced by line by line...
[mothur.git] / rarefactcommand.cpp
index 752ff62298ed183f18e033982b1e0c20513bd963..114c8d06dc3a3a76fbe22e9ee3aec017e335401c 100644 (file)
@@ -104,9 +104,10 @@ int RareFactCommand::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;
        
                //as long as you are not at the end of the file or done wih the lines you want
-               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){
                        
@@ -117,6 +118,7 @@ int RareFactCommand::execute(){
                                cout << order->getLabel() << '\t' << count << endl;
                                processedLabels.insert(order->getLabel());
                                userLabels.erase(order->getLabel());
+                               userLines.erase(count);
                        }
                        
                        if ((anyLabelsToProcess(order->getLabel(), userLabels, "") == true) && (processedLabels.count(lastOrder->getLabel()) != 1)) {