]> git.donarmstrong.com Git - mothur.git/blobdiff - unifracunweightedcommand.cpp
fixed bug with shhh.flow from file path name in write functions, added "smart" featur...
[mothur.git] / unifracunweightedcommand.cpp
index 047d06e27fadff92f647f75875f038f4bf8b04fd..a404f79222ac83cf41d42c04ceb614df1e01dceb 100644 (file)
@@ -155,7 +155,7 @@ UnifracUnweightedCommand::UnifracUnweightedCommand(string option)  {
                        else { m->setGroupFile(groupfile); }
                        
                        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); }
                        
@@ -198,6 +198,11 @@ UnifracUnweightedCommand::UnifracUnweightedCommand(string option)  {
                                m->splitAtDash(groups, Groups);
                                m->setGroups(Groups);
                        }
+                       
+                       if (namefile == "") {
+                               vector<string> files; files.push_back(treefile);
+                               parser.getNameFile(files);
+                       }
                }
                
        }