]> git.donarmstrong.com Git - mothur.git/blobdiff - consensusseqscommand.cpp
fixed bug with shhh.flow from file path name in write functions, added "smart" featur...
[mothur.git] / consensusseqscommand.cpp
index 4f8c53bc9b8cd70fab82a13cd8507a8e5719a07a..223e5dbb86600907fafaafdf5af48ee665adfc5b 100644 (file)
@@ -142,7 +142,7 @@ ConsensusSeqsCommand::ConsensusSeqsCommand(string option)  {
                        }else { m->setFastaFile(fastafile); }   
                        
                        namefile = validParameter.validFile(parameters, "name", true);
-                       if (namefile == "not open") { abort = true; }
+                       if (namefile == "not open") { namefile = ""; abort = true; }
                        else if (namefile == "not found") { namefile = ""; }
                        else { m->setNameFile(namefile); }
                        
@@ -163,7 +163,11 @@ ConsensusSeqsCommand::ConsensusSeqsCommand(string option)  {
                        
                        //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"){  outputDir = m->hasPath(fastafile);      }
-
+                       
+                       if (namefile == ""){
+                               vector<string> files; files.push_back(fastafile); 
+                               parser.getNameFile(files);
+                       }
                }
        }
        catch(exception& e) {