]> git.donarmstrong.com Git - mothur.git/blobdiff - treegroupscommand.h
added sequence name to error string in fastq.info. Changed np_shannon to npshannon.
[mothur.git] / treegroupscommand.h
index 76124f5f7ff3cb2d312eac3091ec1d7b2c727d03..d2d6c721c72fcc5d96926fc246c31e89743dca58 100644 (file)
@@ -13,7 +13,6 @@
 #include "command.hpp"
 #include "inputdata.h"
 #include "groupmap.h"
-#include "readotu.h"
 #include "validcalculator.h"
 #include "tree.h"
 #include "treemap.h"
@@ -27,7 +26,6 @@
        The user can select the lines or labels they wish to use as well as the groups they would like included.
        They can also use as many or as few calculators as they wish. */
        
-class GlobalData;
 
 typedef list<PCell>::iterator MatData;
 
@@ -35,18 +33,26 @@ class TreeGroupCommand : public Command {
        
 public:
        TreeGroupCommand(string);       
+       TreeGroupCommand();
        ~TreeGroupCommand();
-       int execute();  
-       void help();
+       
+       vector<string> setParameters();
+       string getCommandName()                 { return "tree.shared";                         }
+       string getCommandCategory()             { return "OTU-Based Approaches";        }
+       string getHelpString(); 
+       string getCitation() { return "http://www.mothur.org/wiki/Tree.shared"; }
+       string getDescription()         { return "generate a tree file that describes the dissimilarity among groups"; }
+
+       
+       int execute(); 
+       void help() { m->mothurOut(getHelpString()); }  
        
 private:
-       void createTree();
+       int createTree();
        void printSims(ostream&);
-       void makeSimsShared();
-       void makeSimsDist();
+       int makeSimsShared();
+       int makeSimsDist();
        
-       GlobalData* globaldata;
-       ReadOTUFile* read;
        ReadMatrix* readMatrix;
        SparseMatrix* matrix;
        NameAssignment* nameMap;
@@ -57,24 +63,20 @@ private:
        vector< vector<float> > simMatrix;
        map<int, int> index;  //maps row in simMatrix to vector index in the tree       
        InputData* input;
-       ValidCalculators* validCalculator;
        vector<SharedRAbundVector*> lookup;
-       vector<SharedRAbundVector*> lastLookup;
-       string format, outputFile, groupNames, filename;
+       string lastLabel;
+       string format, outputFile, groupNames, filename, sharedfile, inputfile;
        int numGroups;
        ofstream out;
        float precision, cutoff;
-       OptionParser* parser;
-       map<string, string> parameters;
-       map<string, string>::iterator it;
+
        bool abort, allLines;
-       set<int> lines; //hold lines to be used
        set<string> labels; //holds labels to be used
-       string phylipfile, columnfile, namefile, calc, groups, line, label;
-       vector<string>  Estimators, Groups; //holds estimators to be used
+       string phylipfile, columnfile, namefile, calc, groups, label, outputDir;
+       vector<string>  Estimators, Groups, outputNames; //holds estimators to be used
        
        //if the users enters label "0.06" and there is no "0.06" in their file use the next lowest label.
-       void process(vector<SharedRAbundVector*>);
+       int process(vector<SharedRAbundVector*>);