]> git.donarmstrong.com Git - mothur.git/blobdiff - phylodiversitycommand.cpp
fixed bug with tree reading
[mothur.git] / phylodiversitycommand.cpp
index 0822582b2d16b4575f584fbefdd2fffefb39cf55..d15899c2f2f853ba9529c9b65f74ce67885c8a63 100644 (file)
@@ -52,7 +52,7 @@ string PhyloDiversityCommand::getHelpString(){
                helpString += "The phylo.diversity command should be in the following format: phylo.diversity(groups=yourGroups, rarefy=yourRarefy, iters=yourIters).\n";
                helpString += "Example phylo.diversity(groups=A-B-C, rarefy=T, iters=500).\n";
                helpString += "The phylo.diversity command output two files: .phylo.diversity and if rarefy=T, .rarefaction.\n";
-               helpString += "Note: No spaces between parameter labels (i.e. groups), '=' and parameters (i.e.yourGroups).\n\n";
+               helpString += "Note: No spaces between parameter labels (i.e. groups), '=' and parameters (i.e.yourGroups).\n";
                return helpString;
        }
        catch(exception& e) {
@@ -136,6 +136,10 @@ PhyloDiversityCommand::PhyloDiversityCommand(string option)  {
                        }
                        
                        m->runParse = true;
+                       m->Groups.clear();
+                       m->namesOfGroups.clear();
+                       m->Treenames.clear();
+                       m->names.clear();
                        
                        //check for required parameters
                        treefile = validParameter.validFile(parameters, "tree", true);
@@ -210,6 +214,8 @@ int PhyloDiversityCommand::execute(){
                
                if (abort == true) { if (calledHelp) { return 0; }  return 2;   }
                
+               m->setTreeFile(treefile);
+               
                //read in group map info.
                tmap = new TreeMap(groupfile);
                tmap->readMap();