]> git.donarmstrong.com Git - mothur.git/blob - amovacommand.h
mods to amova command
[mothur.git] / amovacommand.h
1 #ifndef AMOVACOMMAND_H
2 #define AMOVACOMMAND_H
3
4 /*
5  *  amovacommand.h
6  *  mothur
7  *
8  *  Created by westcott on 2/7/11.
9  *  Copyright 2011 Schloss Lab. All rights reserved.
10  *
11  */
12
13 #include "command.hpp"
14 #include "inputdata.h"
15 #include "sharedrabundvector.h"
16 #include "validcalculator.h"
17 #include "readphylipvector.h"
18
19 class GlobalData;
20
21 class AmovaCommand : public Command {
22         
23 public:
24         AmovaCommand(string);
25         AmovaCommand();
26         ~AmovaCommand();
27         vector<string> getRequiredParameters();
28         vector<string> getValidParameters();
29         vector<string> getRequiredFiles();
30         map<string, vector<string> > getOutputFiles() { return outputTypes; }
31         int execute();
32         void help();
33         
34 private:
35         double runAMOVA(ofstream&, map<string, vector<int> >, double);
36         double calcSSWithin(map<string, vector<int> >&);
37         double calcSSTotal(map<string, vector<int> >&);
38         map<string, vector<int> > getRandomizedGroups(map<string, vector<int> >);
39
40         
41         bool abort;
42         GlobalData* globaldata;
43         map<string, vector<string> > outputTypes;
44         vector<string> outputNames;
45
46         string outputDir, inputDir, designFileName, phylipFileName;
47         GroupMap* designMap;
48         vector< vector<double> > distanceMatrix;
49         int iters;
50         double experimentwiseAlpha;
51         
52 //      struct linePair {
53 //              int start;
54 //              int num;
55 //              linePair(int i, int j) : start(i), num(j) {}
56 //      };
57 //      vector<linePair> lines;
58 //
59 //      vector< vector<string> > namesOfGroupCombos;
60 //      vector<string> Groups, outputNames, Sets;
61 //      int processors;
62 //      string groups, sets, calc, sharedfile, label, allLines, pickedGroups;
63 //      vector<Calculator*> calculators;
64 //      set<string> labels; //holds labels to be used
65 //      int driver(int, int, vector<SharedRAbundVector*>, string);
66 //      int driver(int, int, vector<string>, string, vector< vector<double> >&);
67 //      int process(vector<SharedRAbundVector*>);       
68 };
69
70 #endif
71