* Mothur
*
* Created by Thomas Ryabin on 2/2/09.
- * Copyright 2009 __MyCompanyName__. All rights reserved.
+ * Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved.
*
*/
#include "getgroupcommand.h"
-
-
-
GetgroupCommand::GetgroupCommand(){
try {
globaldata = GlobalData::getInstance();
groupMap = globaldata->gGroupmap;
+ outputFile = globaldata->inputFileName + ".bootGroups";
+ openOutputFile(outputFile, out);
}
catch(exception& e) {
cout << "Standard Error: " << e.what() << " has occurred in the GetgroupCommand class Function GetgroupCommand. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
int GetgroupCommand::execute(){
try {
vector<string> groupNames = groupMap->namesOfGroups;
- for(int i = 0; i < groupNames.size(); i++)
+ for(int i = 0; i < groupNames.size(); i++) {
cout << groupNames[i] << "\n";
+ out << groupNames[i] << "\t" << groupNames[i] << "\n";
+ }
+ out.close();
return 0;
}