]> git.donarmstrong.com Git - mothur.git/blobdiff - phylotypecommand.cpp
fixed bug with shhh.flow from file path name in write functions, added "smart" featur...
[mothur.git] / phylotypecommand.cpp
index 00f960bbbab8d07ecbee08dc01b78907c60c0185..1d6c391de69c83a86971873577a0df0b21efdbcd 100644 (file)
@@ -128,11 +128,11 @@ PhylotypeCommand::PhylotypeCommand(string option)  {
                                        m->mothurOut("No valid current files. taxonomy is a required parameter."); m->mothurOutEndLine(); 
                                        abort = true; 
                                }
-                       }else if (taxonomyFileName == "not open") { abort = true; }     
+                       }else if (taxonomyFileName == "not open") { taxonomyFileName = ""; abort = true; }      
                        else { m->setTaxonomyFile(taxonomyFileName); }
                        
                        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 { readNamesFile(); m->setNameFile(namefile); }     
                        
@@ -153,6 +153,11 @@ PhylotypeCommand::PhylotypeCommand(string option)  {
                                else { allLines = 1;  }
                        }
                        
+                       if (namefile == "") {
+                               vector<string> files; files.push_back(taxonomyFileName);
+                               parser.getNameFile(files);
+                       }
+                       
                }
        }
        catch(exception& e) {