]> git.donarmstrong.com Git - mothur.git/blobdiff - collectsharedcommand.cpp
Added get.line command.
[mothur.git] / collectsharedcommand.cpp
index 217045a4a1fc5dc0c83986f3b3a0345b755e1f6c..b3f798145bc4de3abe460aa0e8dbccd8825178c6 100644 (file)
@@ -108,9 +108,10 @@ int CollectSharedCommand::execute(){
                        SharedList = globaldata->gSharedList;
                        order = SharedList->getSharedOrderVector();
                }
-               
+               set<string> orderList;
+
                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);
@@ -137,7 +138,11 @@ int CollectSharedCommand::execute(){
                        
                        count++;
                }
-       
+               set<string>::iterator i;
+               for(i = globaldata->labels.begin(); i != globaldata->labels.end(); ++i)
+                       if(orderList.count(*i) == 0)
+                               cout << "'" << *i << "'" << " is not a valid label.\n";
+               globaldata->clearLabels();
                for(int i=0;i<cDisplays.size();i++){    delete cDisplays[i];    }       
                return 0;
        }