X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=collectcommand.cpp;h=f012ba151e0813f9b7ab67f5c2961db8eec23b1b;hb=addc715b6d7ea52440751cec10edad03e1a19b37;hp=0f622c49b2a30632f53e4fa3ec0dfc3196113374;hpb=70ac1dc59244e259b1a972385d490d2ac7f511c0;p=mothur.git diff --git a/collectcommand.cpp b/collectcommand.cpp index 0f622c4..f012ba1 100644 --- a/collectcommand.cpp +++ b/collectcommand.cpp @@ -36,6 +36,7 @@ CollectCommand::CollectCommand(){ }else if (globaldata->Estimators[i] == "chao") { cDisplays.push_back(new CollectDisplay(new Chao1(), new ThreeColumnFile(fileNameRoot+"chao"))); }else if (globaldata->Estimators[i] == "ace") { + convert(globaldata->getAbund(), abund); cDisplays.push_back(new CollectDisplay(new Ace(), new ThreeColumnFile(fileNameRoot+"ace"))); }else if (globaldata->Estimators[i] == "jack") { cDisplays.push_back(new CollectDisplay(new Jackknife(), new ThreeColumnFile(fileNameRoot+"jack"))); @@ -88,11 +89,12 @@ int CollectCommand::execute(){ order = globaldata->gorder; input = globaldata->ginput; - + set orderList; + while(order != NULL){ + orderList.insert(order->getLabel()); if(globaldata->allLines == 1 || globaldata->lines.count(count) == 1 || globaldata->labels.count(order->getLabel()) == 1){ - cCurve = new Collect(order, cDisplays); convert(globaldata->getFreq(), freq); cCurve->getCurve(freq); @@ -101,12 +103,14 @@ int CollectCommand::execute(){ cout << order->getLabel() << '\t' << count << endl; } - order = (input->getOrderVector()); count++; - } - + set::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