X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=treegroupscommand.h;h=d2d6c721c72fcc5d96926fc246c31e89743dca58;hb=8dd3c225255d7084e3aff8740aa4f1f1cabb367a;hp=76124f5f7ff3cb2d312eac3091ec1d7b2c727d03;hpb=0470f6d037aacb3563c3f7010708120a4a67d4e6;p=mothur.git diff --git a/treegroupscommand.h b/treegroupscommand.h index 76124f5..d2d6c72 100644 --- a/treegroupscommand.h +++ b/treegroupscommand.h @@ -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::iterator MatData; @@ -35,18 +33,26 @@ class TreeGroupCommand : public Command { public: TreeGroupCommand(string); + TreeGroupCommand(); ~TreeGroupCommand(); - int execute(); - void help(); + + vector 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 > simMatrix; map index; //maps row in simMatrix to vector index in the tree InputData* input; - ValidCalculators* validCalculator; vector lookup; - vector 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 parameters; - map::iterator it; + bool abort, allLines; - set lines; //hold lines to be used set labels; //holds labels to be used - string phylipfile, columnfile, namefile, calc, groups, line, label; - vector Estimators, Groups; //holds estimators to be used + string phylipfile, columnfile, namefile, calc, groups, label, outputDir; + vector 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); + int process(vector);