]> git.donarmstrong.com Git - mothur.git/blobdiff - consensusseqscommand.cpp
fixed classify.seqs output file name - had issue if reference taxonomy file did not...
[mothur.git] / consensusseqscommand.cpp
index e32867f3737b27bc3b9e929a73f142fe564d48c4..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); }
                        
@@ -159,11 +159,15 @@ ConsensusSeqsCommand::ConsensusSeqsCommand(string option)  {
                        }
                        
                        string temp = validParameter.validFile(parameters, "cutoff", false);  if (temp == "not found") { temp = "100"; }
-                       convert(temp, cutoff); 
+                       m->mothurConvert(temp, cutoff); 
                        
                        //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) {