X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=deuniqueseqscommand.cpp;h=7481416f649ddad983877ab02cac08e5668316d1;hb=2009a1a1f47e7467094d844e7c07ab8ddf7bb447;hp=aed53037c152ded2b13e00b1dfbf30ff739d341d;hpb=e150b0b0664caec517485ee6d69dcdade6dcae77;p=mothur.git diff --git a/deuniqueseqscommand.cpp b/deuniqueseqscommand.cpp index aed5303..7481416 100644 --- a/deuniqueseqscommand.cpp +++ b/deuniqueseqscommand.cpp @@ -114,7 +114,7 @@ DeUniqueSeqsCommand::DeUniqueSeqsCommand(string option) { fastaFile = m->getFastaFile(); if (fastaFile != "") { m->mothurOut("Using " + fastaFile + " as input file for the fasta parameter."); m->mothurOutEndLine(); } else { m->mothurOut("You have no current fastafile and the fasta parameter is required."); m->mothurOutEndLine(); abort = true; } - } + }else { m->setFastaFile(fastaFile); } //if the user changes the output directory command factory will send this info to us in the output parameter outputDir = validParameter.validFile(parameters, "outputdir", false); if (outputDir == "not found"){ @@ -128,7 +128,7 @@ DeUniqueSeqsCommand::DeUniqueSeqsCommand(string option) { nameFile = m->getNameFile(); if (nameFile != "") { m->mothurOut("Using " + nameFile + " as input file for the name parameter."); m->mothurOutEndLine(); } else { m->mothurOut("You have no current namefile and the name parameter is required."); m->mothurOutEndLine(); abort = true; } - } + }else { m->setNameFile(nameFile); } } } @@ -155,14 +155,14 @@ int DeUniqueSeqsCommand::execute() { m->openOutputFile(outFastaFile, out); readNamesFile(); - if (m->control_pressed) { out.close(); outputTypes.clear(); remove(outFastaFile.c_str()); return 0; } + if (m->control_pressed) { out.close(); outputTypes.clear(); m->mothurRemove(outFastaFile); return 0; } ifstream in; m->openInputFile(fastaFile, in); while (!in.eof()) { - if (m->control_pressed) { in.close(); out.close(); outputTypes.clear(); remove(outFastaFile.c_str()); return 0; } + if (m->control_pressed) { in.close(); out.close(); outputTypes.clear(); m->mothurRemove(outFastaFile); return 0; } Sequence seq(in); m->gobble(in); @@ -196,7 +196,7 @@ int DeUniqueSeqsCommand::execute() { } } - if (m->control_pressed) { outputTypes.clear(); remove(outFastaFile.c_str()); return 0; } + if (m->control_pressed) { outputTypes.clear(); m->mothurRemove(outFastaFile); return 0; } m->mothurOutEndLine(); m->mothurOut("Output File Names: "); m->mothurOutEndLine();