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