]> git.donarmstrong.com Git - mothur.git/blobdiff - trimflowscommand.cpp
added current as option is lists of file names, processors now outputted with current...
[mothur.git] / trimflowscommand.cpp
index c4b5f43cc112861097b44829d6f4d300f9335d30..bb0fa0475d2bfbb344d025ae493a95c557712592 100644 (file)
@@ -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"){