]> git.donarmstrong.com Git - mothur.git/blobdiff - trimflowscommand.cpp
working on chimera.slayer
[mothur.git] / trimflowscommand.cpp
index e6c6fdf8bd61099bca9b73fc5a106d4aaa692602..bb0fa0475d2bfbb344d025ae493a95c557712592 100644 (file)
@@ -47,7 +47,7 @@ string TrimFlowsCommand::getHelpString(){
                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) {
@@ -136,8 +136,14 @@ TrimFlowsCommand::TrimFlowsCommand(string option)  {
                        
                        //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"){