8 * Created by westcott on 2/7/11.
9 * Copyright 2011 Schloss Lab. All rights reserved.
13 #include "command.hpp"
14 #include "inputdata.h"
15 #include "sharedrabundvector.h"
16 #include "validcalculator.h"
17 #include "readphylipvector.h"
21 class AmovaCommand : public Command {
27 vector<string> getRequiredParameters();
28 vector<string> getValidParameters();
29 vector<string> getRequiredFiles();
30 map<string, vector<string> > getOutputFiles() { return outputTypes; }
38 linePair(int i, int j) : start(i), num(j) {}
40 vector<linePair> lines;
42 GlobalData* globaldata;
44 map<string, vector<string> > outputTypes;
46 vector< vector<double> > matrix;
47 bool abort, allLines, pickedGroups;
48 set<string> labels; //holds labels to be used
49 string format, groups, label, outputDir, inputDir, designfile, sets, phylipfile, calc, sharedfile;
50 vector<string> Groups, outputNames, Sets;
51 vector< vector<string> > namesOfGroupCombos;
52 int iters, processors;
53 vector<Calculator*> calculators;
55 int driver(int, int, vector<SharedRAbundVector*>, string);
56 int driver(int, int, vector<string>, string, vector< vector<double> >&);
57 int process(vector<SharedRAbundVector*>);
58 int calcAmova(ofstream&, int, vector<string>);
59 double calcWithin(vector< vector<double> >&, int, vector<string>);
60 double calcTotal(int);