X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=getgroupcommand.cpp;h=194e8e16b1e388bdb8d01ac372fbc884cbc92e43;hb=19fcbbdba99658f5eca244803280f9ee7f9f6607;hp=6b76bf2d74a1c3443111dade5d7ceaad7a1c75a2;hpb=d4429ccc354708f3c9a13c809ba9b57c22908d2b;p=mothur.git diff --git a/getgroupcommand.cpp b/getgroupcommand.cpp index 6b76bf2..194e8e1 100644 --- a/getgroupcommand.cpp +++ b/getgroupcommand.cpp @@ -62,6 +62,7 @@ GetgroupCommand::GetgroupCommand(string option) { //allow user to run help if(option == "help") { help(); abort = true; calledHelp = true; } + else if(option == "citation") { citation(); abort = true; calledHelp = true;} else { vector myArray = setParameters(); @@ -102,7 +103,7 @@ GetgroupCommand::GetgroupCommand(string option) { sharedfile = m->getSharedFile(); if (sharedfile != "") { m->mothurOut("Using " + sharedfile + " as input file for the shared parameter."); m->mothurOutEndLine(); } else { m->mothurOut("You have no current sharedfile and the shared parameter is required."); m->mothurOutEndLine(); abort = true; } - } + }else { m->setSharedFile(sharedfile); } //if the user changes the output directory command factory will send this info to us in the output parameter @@ -145,13 +146,13 @@ int GetgroupCommand::execute(){ in >> inputData; } - if (m->control_pressed) { outputTypes.clear(); in.close(); out.close(); remove(outputFile.c_str()); return 0; } + if (m->control_pressed) { outputTypes.clear(); in.close(); out.close(); m->mothurRemove(outputFile); return 0; } if (in.eof() != true) { in >> nextLabel; } //read the rest of the groups info in while ((nextLabel == holdLabel) && (in.eof() != true)) { - if (m->control_pressed) { outputTypes.clear(); in.close(); out.close(); remove(outputFile.c_str()); return 0; } + if (m->control_pressed) { outputTypes.clear(); in.close(); out.close(); m->mothurRemove(outputFile); return 0; } in >> groupN >> num; count++; @@ -171,7 +172,7 @@ int GetgroupCommand::execute(){ in.close(); out.close(); - if (m->control_pressed) { remove(outputFile.c_str()); return 0; } + if (m->control_pressed) { m->mothurRemove(outputFile); return 0; } m->mothurOutEndLine(); m->mothurOut("Output File Name: "); m->mothurOutEndLine();