]> git.donarmstrong.com Git - mothur.git/commitdiff
fixed bug with tree reading
authorwestcott <westcott>
Thu, 7 Apr 2011 15:12:08 +0000 (15:12 +0000)
committerwestcott <westcott>
Thu, 7 Apr 2011 15:12:08 +0000 (15:12 +0000)
14 files changed:
Mothur.xcodeproj/project.pbxproj
clustercommand.h
clusterdoturcommand.h
clustersplitcommand.h
getcurrentcommand.cpp
hclustercommand.h
indicatorcommand.cpp
mgclustercommand.h
parsimonycommand.cpp
phylodiversitycommand.cpp
phylotypecommand.h
sensspeccommand.cpp
unifracunweightedcommand.cpp
unifracweightedcommand.cpp

index 00f51b2fa99b508e95e6a038b2ebe98245c6768e..9d88f25064191eecf67cf4998063737960191634 100644 (file)
                                GCC_OPTIMIZATION_LEVEL = 3;
                                GCC_PREPROCESSOR_DEFINITIONS = (
                                        "MOTHUR_FILES=\"\\\"../release\\\"\"",
-                                       "VERSION=\"\\\"1.17.3\\\"\"",
-                                       "RELEASE_DATE=\"\\\"3/07/2011\\\"\"",
+                                       "VERSION=\"\\\"1.18.0\\\"\"",
+                                       "RELEASE_DATE=\"\\\"4/11/2011\\\"\"",
                                );
                                GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
                                GCC_WARN_ABOUT_RETURN_TYPE = YES;
                                GCC_MODEL_TUNING = "";
                                GCC_OPTIMIZATION_LEVEL = 3;
                                GCC_PREPROCESSOR_DEFINITIONS = (
-                                       "MOTHUR_FILES=\"\\\"../release\\\"\"",
-                                       "VERSION=\"\\\"1.15.0\\\"\"",
-                                       "RELEASE_DATE=\"\\\"12/10/2010\\\"\"",
+                                       "VERSION=\"\\\"1.18.0\\\"\"",
+                                       "RELEASE_DATE=\"\\\"4/11/2011\\\"\"",
                                );
                                GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
                                GCC_WARN_ABOUT_RETURN_TYPE = YES;
index 368760ac9465c231674b84de2ffffa5b714382f2..bda61403ced8b4b7051edd69d22623c14184bc54 100644 (file)
@@ -32,8 +32,8 @@ public:
        ~ClusterCommand();
        
        vector<string> setParameters();
-       string getCommandName()                 { return "cluster";                                     }
-       string getCommandCategory()             { return "OTU-Based Approaches";        }
+       string getCommandName()                 { return "cluster";             }
+       string getCommandCategory()             { return "Clustering";  }
        string getHelpString(); 
        
        int execute(); 
index 5358488c549ca911f9015a6e3f6caba81b9b4286..f435a9879c992d3dd5a0739f6db1d8b016b9b8b5 100644 (file)
@@ -25,8 +25,8 @@ public:
        ~ClusterDoturCommand(){}
        
        vector<string> setParameters();
-       string getCommandName()                 { return "cluster.classic";                     }
-       string getCommandCategory()             { return "OTU-Based Approaches";        }
+       string getCommandName()                 { return "cluster.classic";             }
+       string getCommandCategory()             { return "Clustering";                  }
        string getHelpString(); 
        
        int execute(); 
index 28c7d237dccb8ce31542c76f01378b0f8e053d71..bdefb420de685f6c790deae1589a737ec75c2543 100644 (file)
@@ -26,8 +26,8 @@ public:
        ~ClusterSplitCommand() {}
        
        vector<string> setParameters();
-       string getCommandName()                 { return "cluster.split";                       }
-       string getCommandCategory()             { return "OTU-Based Approaches";        }
+       string getCommandName()                 { return "cluster.split";               }
+       string getCommandCategory()             { return "Clustering";                  }
        string getHelpString(); 
        
        int execute(); 
index 7bfae208ad9eb6b1a94ba92e2ae028c2f986f24a..2f67123a88c9795c362fac6cc4a428fc8e961d46 100644 (file)
@@ -134,7 +134,7 @@ int GetCurrentCommand::execute(){
                                }else if (types[i] == "accnos") {
                                        m->setAccnosFile("");
                                }else if (types[i] == "taxonomy") {
-                                               m->setTaxonomyFile("");
+                                       m->setTaxonomyFile("");
                                }else if (types[i] == "all") {
                                        m->clearCurrentFiles();
                                }else {
index 5fbdb3d1ab3bfe15a141c1d710ea6d84186a07db..9241e94c35441e1b0d09d3bddae9a76d8f6c4cc6 100644 (file)
@@ -36,8 +36,8 @@ public:
        ~HClusterCommand(){}
        
        vector<string> setParameters();
-       string getCommandName()                 { return "hcluster";                            }
-       string getCommandCategory()             { return "OTU-Based Approaches";        }
+       string getCommandName()                 { return "hcluster";    }
+       string getCommandCategory()             { return "Clustering";  }
        string getHelpString(); 
        
        int execute(); 
index 01bc2f1d7405093db6a3f5fc4b44a0c17e76fbd3..c25e4fa13b4b7cc8eaf7f320d66b1806a3bf194d 100644 (file)
@@ -90,6 +90,10 @@ IndicatorCommand::IndicatorCommand(string option)  {
                        }
                        
                        m->runParse = true;
+                       m->Groups.clear();
+                       m->namesOfGroups.clear();
+                       m->Treenames.clear();
+                       m->names.clear();
                        
                        vector<string> tempOutNames;
                        outputTypes["tree"] = tempOutNames;
@@ -231,6 +235,7 @@ int IndicatorCommand::execute(){
                //    reading tree info                                                    //
                /***************************************************/
                string groupfile = ""; 
+               m->setTreeFile(treefile);
                Tree* tree = new Tree(treefile); delete tree;  //extracts names from tree to make faked out groupmap
                treeMap = new TreeMap();
                bool mismatch = false;
index a51fec5b298991b976095c52b7944c2fbab84cb8..c23534f9dfd375cb34cc8c85963d17e8dbfee23d 100644 (file)
@@ -29,8 +29,8 @@ public:
        ~MGClusterCommand(){}
        
        vector<string> setParameters();
-       string getCommandName()                 { return "mgcluster";                           }
-       string getCommandCategory()             { return "OTU-Based Approaches";        }
+       string getCommandName()                 { return "mgcluster";   }
+       string getCommandCategory()             { return "Clustering";  }
        string getHelpString(); 
        
        int execute(); 
index be64ec273ec8c62fcba9a7cd206955878f7e21ed..1be4697a4f3fde882fa08985a8a1e01072110596 100644 (file)
@@ -125,6 +125,10 @@ ParsimonyCommand::ParsimonyCommand(string option)  {
                        }
                        
                        m->runParse = true;
+                       m->Groups.clear();
+                       m->namesOfGroups.clear();
+                       m->Treenames.clear();
+                       m->names.clear();
                        
                        outputDir = validParameter.validFile(parameters, "outputdir", false);           if (outputDir == "not found"){  outputDir = ""; }
                        
@@ -188,6 +192,9 @@ int ParsimonyCommand::execute() {
                //randomtree will tell us if user had their own treefile or if they just want the random distribution
                //user has entered their own tree
                if (randomtree == "") { 
+                       
+                       m->setTreeFile(treefile);
+                       
                        if (groupfile != "") {
                                //read in group map info.
                                tmap = new TreeMap(groupfile);
index 48d8555e1285ce854b0a45efbfdb75057bad5a1f..d15899c2f2f853ba9529c9b65f74ce67885c8a63 100644 (file)
@@ -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();
index 36e679f28aab41ec31848084b117845a9ecab12c..30a578221f09042817534b51f91d8e33f3125c6c 100644 (file)
@@ -24,8 +24,8 @@ public:
        ~PhylotypeCommand(){}
        
        vector<string> setParameters();
-       string getCommandName()                 { return "phylotype";                           }
-       string getCommandCategory()             { return "OTU-Based Approaches";        }
+       string getCommandName()                 { return "phylotype";           }
+       string getCommandCategory()             { return "Clustering";          }
        string getHelpString(); 
        
        int execute();
index 7c4dc1322e9b69cbc021274a292098c7bbe67b57..c7f67b40b0e10ae14741600f9b8b3b8d7e0adaa2 100644 (file)
@@ -208,6 +208,11 @@ int SensSpecCommand::execute(){
                if(format == "phylip")          {       processPhylip();        }
                else if(format == "column")     {       processColumn();        }
                
+               m->mothurOutEndLine();
+               m->mothurOut("Output File Name: "); m->mothurOutEndLine();
+               m->mothurOut(sensSpecFileName); m->mothurOutEndLine();  
+               m->mothurOutEndLine();
+               
                
                return 0;       
        }
index eef37bd93b4dcc98fbf2bcadee93231be66b52ab..a9ca4d01260340fbdc08ccf423c6022f8dd5abbc 100644 (file)
@@ -133,6 +133,10 @@ UnifracUnweightedCommand::UnifracUnweightedCommand(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);
@@ -206,6 +210,8 @@ int UnifracUnweightedCommand::execute() {
                
                if (abort == true) { if (calledHelp) { return 0; }  return 2;   }
                
+               m->setTreeFile(treefile);
+               
                if (groupfile != "") {
                        //read in group map info.
                        tmap = new TreeMap(groupfile);
index 7915cac122cdaa08e8fef3b896a774499462a343..f868129fd2236a3aca06cf27f2e25b2229013ccf 100644 (file)
@@ -133,6 +133,10 @@ UnifracWeightedCommand::UnifracWeightedCommand(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);
@@ -200,6 +204,8 @@ int UnifracWeightedCommand::execute() {
        
                if (abort == true) { if (calledHelp) { return 0; }  return 2;   }
                
+               m->setTreeFile(treefile);
+               
                if (groupfile != "") {
                        //read in group map info.
                        tmap = new TreeMap(groupfile);