string helpString = "";
helpString += "The trim.flows command reads a flowgram file and creates .....\n";
helpString += "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFasta).\n";
- helpString += "For more details please check out the wiki http://www.mothur.org/wiki/Trim.flows.\n\n";
+ helpString += "For more details please check out the wiki http://www.mothur.org/wiki/Trim.flows.\n";
return helpString;
}
catch(exception& e) {
//check for required parameters
flowFileName = validParameter.validFile(parameters, "flow", true);
- if (flowFileName == "not found") { m->mothurOut("flow is a required parameter for the trim.flows command."); m->mothurOutEndLine(); abort = true; }
- else if (flowFileName == "not open") { abort = true; }
+ if (flowFileName == "not found") {
+ flowFileName = m->getFlowFile();
+ if (flowFileName != "") { m->mothurOut("Using " + flowFileName + " as input file for the flow parameter."); m->mothurOutEndLine(); }
+ else {
+ m->mothurOut("No valid current flow file. You must provide a flow file."); m->mothurOutEndLine();
+ abort = true;
+ }
+ }else if (flowFileName == "not open") { flowFileName = ""; abort = true; }
//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"){