]> git.donarmstrong.com Git - mothur.git/blobdiff - parsimonycommand.cpp
added otu.association command. added calcSpearman, calcKendall and calcPearson functi...
[mothur.git] / parsimonycommand.cpp
index 3752935aac5ad0211c5f9bf5b66ca00dce2b366b..2d46efc9efebcfbe7807292cb814cf58686f9ac4 100644 (file)
@@ -139,7 +139,7 @@ ParsimonyCommand::ParsimonyCommand(string option)  {
                        if (randomtree == "")  {
                                //check for required parameters
                                treefile = validParameter.validFile(parameters, "tree", true);
-                               if (treefile == "not open") { abort = true; }
+                               if (treefile == "not open") { treefile = ""; abort = true; }
                                else if (treefile == "not found") {                             //if there is a current design file, use it
                                        treefile = m->getTreeFile(); 
                                        if (treefile != "") { m->mothurOut("Using " + treefile + " as input file for the tree parameter."); m->mothurOutEndLine(); }
@@ -153,7 +153,7 @@ ParsimonyCommand::ParsimonyCommand(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,11 +171,16 @@ ParsimonyCommand::ParsimonyCommand(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, "processors", false);        if (temp == "not found"){       temp = m->getProcessors();      }
                        m->setProcessors(temp);
-                       convert(temp, processors);
+                       m->mothurConvert(temp, processors);
+                       
+                       if (namefile == "") {
+                               vector<string> files; files.push_back(treefile);
+                               parser.getNameFile(files);
+                       }
                        
                }