X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=getgroupcommand.cpp;h=3fc67d11612bccfdced922b1a8276b90cfc5b023;hp=b4d2d74d0cc72d6c7f4db7acbd4202e3ea5b9972;hb=3117b1c3109121dff476997d3c5db5b47a77729b;hpb=a5a908953ab2ebb9386a895e5ddddf0135ad1f99 diff --git a/getgroupcommand.cpp b/getgroupcommand.cpp index b4d2d74..3fc67d1 100644 --- a/getgroupcommand.cpp +++ b/getgroupcommand.cpp @@ -14,6 +14,8 @@ 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"; @@ -36,8 +38,11 @@ GetgroupCommand::~GetgroupCommand(){ int GetgroupCommand::execute(){ try { vector 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; }