]> git.donarmstrong.com Git - mothur.git/blob - anosimcommand.h
aad676ab17d04ef25a9f6be2faa685d3ae580fc4
[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
16 class GroupMap;
17
18 class AnosimCommand : public Command {
19         
20 public:
21         AnosimCommand(string);
22         AnosimCommand();
23         ~AnosimCommand(){}
24         
25         vector<string> setParameters();
26         string getCommandName()                 { return "anosim";                                      }
27         string getCommandCategory()             { return "Hypothesis Testing";          }
28         string getHelpString(); 
29         string getCitation() { return "Referenced: Clarke, K. R. (1993). Non-parametric multivariate analysis of changes in community structure. _Australian Journal of Ecology_ 18, 117-143. http://www.mothur.org/wiki/Anosim"; }
30         
31         int execute();
32         void help() { m->mothurOut(getHelpString()); }
33         
34 private:
35         bool abort;
36         GroupMap* designMap;
37         string outputDir, inputDir, designFileName, phylipFileName;
38         
39         vector<vector<double> > convertToRanks(vector<vector<double> >);
40         double calcR(vector<vector<double> >, map<string, vector<int> >);
41         map<string, vector<int> > getRandomizedGroups(map<string, vector<int> >);
42         double runANOSIM(ofstream&, vector<vector<double> >, map<string, vector<int> >, double);
43         
44         vector< vector<double> > distanceMatrix;
45         vector<string> outputNames;
46         int iters;
47         double experimentwiseAlpha;
48         vector< vector<string> > namesOfGroupCombos;
49         
50         
51 };
52
53 #endif
54
55
56