X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=treegroupscommand.h;h=3e8fbb01c4df3c34540a11342a5a960a03788145;hb=438aa88dbc092d9c1c80ec3fa20c8e47f97101c4;hp=4c3b8424efa456ff20d52f8f217f2f3015d793b6;hpb=c5c7502f435e1413c19e373dab1dfebcaa67588d;p=mothur.git diff --git a/treegroupscommand.h b/treegroupscommand.h index 4c3b842..3e8fbb0 100644 --- a/treegroupscommand.h +++ b/treegroupscommand.h @@ -11,15 +11,16 @@ */ #include "command.hpp" -#include "sharedordervector.h" -#include "sharedlistvector.h" #include "inputdata.h" #include "groupmap.h" -#include "readmatrix.hpp" +#include "readotu.h" #include "validcalculator.h" #include "tree.h" #include "treemap.h" -#include "sharedutilities.h" +#include "readmatrix.hpp" +#include "readcolumn.h" +#include "readphylip.h" +#include "sparsematrix.hpp" /* This command create a tree file for each similarity calculator at distance level, using various calculators to find the similiarity between groups. @@ -28,20 +29,28 @@ class GlobalData; +typedef list::iterator MatData; + class TreeGroupCommand : public Command { public: - TreeGroupCommand(); + TreeGroupCommand(string); ~TreeGroupCommand(); int execute(); + void help(); private: - void createTree(); - void printSims(); + int createTree(); + void printSims(ostream&); + int makeSimsShared(); + int makeSimsDist(); GlobalData* globaldata; - SharedUtil* util; - ReadMatrix* read; + ReadOTUFile* read; + ReadMatrix* readMatrix; + SparseMatrix* matrix; + NameAssignment* nameMap; + ListVector* list; TreeMap* tmap; Tree* t; vector treeCalculators; @@ -49,11 +58,22 @@ private: map index; //maps row in simMatrix to vector index in the tree InputData* input; ValidCalculators* validCalculator; - SharedListVector* SharedList; - SharedOrderVector* order; vector lookup; - string format, outputFile, groupNames; + string lastLabel; + string format, outputFile, groupNames, filename; int numGroups; + ofstream out; + float precision, cutoff; + + bool abort, allLines; + set labels; //holds labels 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. + int process(vector); + + };