X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=secondarystructurecommand.cpp;h=24142e0cf4aa6174a8006f1e0a7a85c82f10ab24;hb=791f42d21a85f794529fd4c912dcc27d873c25e8;hp=cc53ee0f02741cbe0fc6358a3a08cd56e891cd09;hpb=7bf9a81bba76538ecaf351ae208de3da4bf1b6dd;p=mothur.git diff --git a/secondarystructurecommand.cpp b/secondarystructurecommand.cpp index cc53ee0..24142e0 100644 --- a/secondarystructurecommand.cpp +++ b/secondarystructurecommand.cpp @@ -122,7 +122,7 @@ AlignCheckCommand::AlignCheckCommand(string option) { else if (mapfile == "not found") { mapfile = ""; m->mothurOut("You must provide an map file."); m->mothurOutEndLine(); abort = true; } fastafile = validParameter.validFile(parameters, "fasta", true); - if (fastafile == "not open") { abort = true; } + if (fastafile == "not open") { fastafile = ""; abort = true; } else if (fastafile == "not found") { fastafile = m->getFastaFile(); if (fastafile != "") { m->mothurOut("Using " + fastafile + " as input file for the fasta parameter."); m->mothurOutEndLine(); } @@ -139,7 +139,11 @@ AlignCheckCommand::AlignCheckCommand(string option) { outputDir = ""; outputDir += m->hasPath(fastafile); //if user entered a file with a path then preserve it } - + + if ((namefile == "") && (fastafile != "")){ + vector files; files.push_back(fastafile); + parser.getNameFile(files); + } } } @@ -183,7 +187,7 @@ int AlignCheckCommand::execute(){ int count = 0; while(!in.eof()){ - if (m->control_pressed) { in.close(); out.close(); remove(outfile.c_str()); return 0; } + if (m->control_pressed) { in.close(); out.close(); m->mothurRemove(outfile); return 0; } Sequence seq(in); m->gobble(in); if (seq.getName() != "") { @@ -220,7 +224,7 @@ int AlignCheckCommand::execute(){ in.close(); out.close(); - if (m->control_pressed) { remove(outfile.c_str()); return 0; } + if (m->control_pressed) { m->mothurRemove(outfile); return 0; } sort(pound.begin(), pound.end()); sort(dash.begin(), dash.end()); @@ -238,7 +242,7 @@ int AlignCheckCommand::execute(){ int ptile97_5 = int(size * 0.975); int ptile100 = size - 1; - if (m->control_pressed) { remove(outfile.c_str()); return 0; } + if (m->control_pressed) { m->mothurRemove(outfile); return 0; } m->mothurOutEndLine(); m->mothurOut("\t\tPound\tDash\tPlus\tEqual\tLoop\tTilde\tTotal"); m->mothurOutEndLine();