X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=chimeraseqscommand.cpp;h=17f3a71a5033f1d28835bbd562af5d5f9a6b5a18;hb=fe346922fe0af5b1a025beacb211078d37598fd4;hp=ba980a50e46405dfc3087f5ba7c02d0b25cab1ff;hpb=143ce9d26deb936202317b52f6af473542c7df78;p=mothur.git diff --git a/chimeraseqscommand.cpp b/chimeraseqscommand.cpp index ba980a5..17f3a71 100644 --- a/chimeraseqscommand.cpp +++ b/chimeraseqscommand.cpp @@ -52,9 +52,15 @@ ChimeraSeqsCommand::ChimeraSeqsCommand(string option){ if (quanfile == "not open") { abort = true; } else if (quanfile == "not found") { quanfile = ""; } - maskfile = validParameter.validFile(parameters, "mask", true); - if (maskfile == "not open") { abort = true; } - else if (maskfile == "not found") { maskfile = ""; } + maskfile = validParameter.validFile(parameters, "mask", false); + if (maskfile == "not found") { maskfile = ""; } + else if (maskfile != "default") { + ifstream in; + int ableToOpen = openInputFile(maskfile, in); + if (ableToOpen == 1) { abort = true; } + in.close(); + } + @@ -129,7 +135,7 @@ int ChimeraSeqsCommand::execute(){ if (quanfile != "") { chimera->setQuantiles(quanfile); } else { chimera->setQuantiles(""); } - if (maskfile == "") { mothurOut("You have not provided a mask, so I am using the default 236627 EU009184.1 Shigella dysenteriae str. FBD013."); mothurOutEndLine(); } + if (maskfile == "default") { mothurOut("I am using the default 236627 EU009184.1 Shigella dysenteriae str. FBD013."); mothurOutEndLine(); } chimera->setMask(maskfile); }else { mothurOut("Not a valid method."); mothurOutEndLine(); return 0; }