]> git.donarmstrong.com Git - mothur.git/blobdiff - unifracunweightedcommand.cpp
added otu.association command. added calcSpearman, calcKendall and calcPearson functi...
[mothur.git] / unifracunweightedcommand.cpp
index c09301f62be0cba7bb2eee024442cc94e6e5c0a3..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); }
                        
@@ -171,7 +171,7 @@ UnifracUnweightedCommand::UnifracUnweightedCommand(string option)  {
                        }
                                
                        itersString = validParameter.validFile(parameters, "iters", false);                             if (itersString == "not found") { itersString = "1000"; }
-                       convert(itersString, iters); 
+                       m->mothurConvert(itersString, iters); 
                        
                        string temp = validParameter.validFile(parameters, "distance", false);                  
                        if (temp == "not found") { phylip = false; outputForm = ""; }
@@ -188,7 +188,7 @@ UnifracUnweightedCommand::UnifracUnweightedCommand(string option)  {
                        
                        temp = validParameter.validFile(parameters, "processors", false);       if (temp == "not found"){       temp = m->getProcessors();      }
                        m->setProcessors(temp);
-                       convert(temp, processors); 
+                       m->mothurConvert(temp, processors); 
                        
                        if (!random) {  iters = 0;  } //turn off random calcs
                        
@@ -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);
+                       }
                }
                
        }