1 #ifndef TREEGROUPCOMMAND_H
2 #define TREEGROUPCOMMAND_H
8 * Created by Sarah Westcott on 4/8/09.
9 * Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved.
13 #include "command.hpp"
14 #include "inputdata.h"
17 #include "validcalculator.h"
20 #include "readmatrix.hpp"
21 #include "readcolumn.h"
22 #include "readphylip.h"
23 #include "sparsematrix.hpp"
26 /* This command create a tree file for each similarity calculator at distance level, using various calculators to find the similiarity between groups.
27 The user can select the lines or labels they wish to use as well as the groups they would like included.
28 They can also use as many or as few calculators as they wish. */
32 typedef list<PCell>::iterator MatData;
34 class TreeGroupCommand : public Command {
37 TreeGroupCommand(string);
44 void printSims(ostream&);
45 void makeSimsShared();
48 GlobalData* globaldata;
50 ReadMatrix* readMatrix;
52 NameAssignment* nameMap;
56 vector<Calculator*> treeCalculators;
57 vector< vector<float> > simMatrix;
58 map<int, int> index; //maps row in simMatrix to vector index in the tree
60 ValidCalculators* validCalculator;
61 vector<SharedRAbundVector*> lookup;
63 string format, outputFile, groupNames, filename;
66 float precision, cutoff;
69 set<int> lines; //hold lines to be used
70 set<string> labels; //holds labels to be used
71 string phylipfile, columnfile, namefile, calc, groups, line, label;
72 vector<string> Estimators, Groups; //holds estimators to be used
74 //if the users enters label "0.06" and there is no "0.06" in their file use the next lowest label.
75 void process(vector<SharedRAbundVector*>);