]> git.donarmstrong.com Git - mothur.git/blobdiff - getoturepcommand.cpp
added get.rabund and get.sabund command and fixed bug introduced by line by line...
[mothur.git] / getoturepcommand.cpp
index acb9372ff173b211685ea555531643966f8addc1..eb88fbf5ab807b451b00025d55a1ce719a6c6ccd 100644 (file)
@@ -99,9 +99,10 @@ int GetOTURepCommand::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((list != NULL) && ((globaldata->allLines == 1) || (userLabels.size() != 0))) {
+               while((list != NULL) && ((globaldata->allLines == 1) || (userLabels.size() != 0) || (userLines.size() != 0))) {
                        
                        if(globaldata->allLines == 1 || globaldata->lines.count(count) == 1 || globaldata->labels.count(list->getLabel()) == 1){
                                        cout << list->getLabel() << '\t' << count << endl;
@@ -110,6 +111,7 @@ int GetOTURepCommand::execute(){
                                        
                                        processedLabels.insert(list->getLabel());
                                        userLabels.erase(list->getLabel());
+                                       userLines.erase(count);
                        }
                        
                        if ((anyLabelsToProcess(list->getLabel(), userLabels, "") == true) && (processedLabels.count(lastList->getLabel()) != 1)) {