X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=degapseqscommand.cpp;h=1d83f3bef00d08574a66d7e5ecf21efa148452a4;hb=8dd3c225255d7084e3aff8740aa4f1f1cabb367a;hp=c90064f190af3421a2f3f6ebc673b1265a1f202a;hpb=86c838c428a9e7d26f902f5492738241fa72c4e7;p=mothur.git diff --git a/degapseqscommand.cpp b/degapseqscommand.cpp index c90064f..1d83f3b 100644 --- a/degapseqscommand.cpp +++ b/degapseqscommand.cpp @@ -65,6 +65,7 @@ DegapSeqsCommand::DegapSeqsCommand(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(); @@ -155,7 +156,7 @@ DegapSeqsCommand::DegapSeqsCommand(string option) { //erase from file list fastaFileNames.erase(fastaFileNames.begin()+i); i--; - } + }else { m->setFastaFile(fastaFileNames[i]); } } } @@ -196,7 +197,7 @@ int DegapSeqsCommand::execute(){ m->openOutputFile(degapFile, outFASTA); while(!inFASTA.eof()){ - if (m->control_pressed) { outputTypes.clear(); inFASTA.close(); outFASTA.close(); remove(degapFile.c_str()); for (int j = 0; j < outputNames.size(); j++) { remove(outputNames[j].c_str()); } return 0; } + if (m->control_pressed) { outputTypes.clear(); inFASTA.close(); outFASTA.close(); m->mothurRemove(degapFile); for (int j = 0; j < outputNames.size(); j++) { m->mothurRemove(outputNames[j]); } return 0; } Sequence currSeq(inFASTA); m->gobble(inFASTA); if (currSeq.getName() != "") { @@ -209,7 +210,7 @@ int DegapSeqsCommand::execute(){ outputNames.push_back(degapFile); outputTypes["fasta"].push_back(degapFile); - if (m->control_pressed) { outputTypes.clear(); remove(degapFile.c_str()); for (int j = 0; j < outputNames.size(); j++) { remove(outputNames[j].c_str()); } return 0; } + if (m->control_pressed) { outputTypes.clear(); m->mothurRemove(degapFile); for (int j = 0; j < outputNames.size(); j++) { m->mothurRemove(outputNames[j]); } return 0; } } //set fasta file as new current fastafile