]> git.donarmstrong.com Git - mothur.git/blob - source/indicatorcommand.h
fixing
[mothur.git] / source / indicatorcommand.h
1 #ifndef INDICATORCOMMAND_H
2 #define INDICATORCOMMAND_H
3
4 /*
5  *  indicatorcommand.h
6  *  Mothur
7  *
8  *  Created by westcott on 11/12/10.
9  *  Copyright 2010 Schloss Lab. All rights reserved.
10  *
11  */
12
13 #include "command.hpp"
14 #include "readtree.h"
15 #include "treemap.h"
16 #include "sharedrabundvector.h"
17 #include "sharedrabundfloatvector.h"
18 #include "inputdata.h"
19
20 class IndicatorCommand : public Command {
21 public:
22         IndicatorCommand(string);
23         IndicatorCommand();
24         ~IndicatorCommand(){}
25         
26         vector<string> setParameters();
27         string getCommandName()                 { return "indicator";                           }
28         string getCommandCategory()             { return "Hypothesis Testing";          }
29         string getHelpString(); 
30         string getCitation() { return "Dufrene M, Legendre P (1997). Species assemblages and indicator species: The need for a flexible asymmetrical approach. Ecol Monogr 67: 345-66.\n McCune B, Grace JB, Urban DL (2002). Analysis of ecological communities. MjM Software Design: Gleneden Beach, OR. \nLegendre P, Legendre L (1998). Numerical Ecology. Elsevier: New York. \nhttp://www.mothur.org/wiki/Indicator"; }
31         string getDescription()         { return "calculate the indicator value for each OTU"; }
32
33         int execute();
34         void help() { m->mothurOut(getHelpString()); }  
35         
36 private:
37         ReadTree* read;
38         TreeMap* treeMap;
39         GroupMap* designMap;
40         string treefile, sharedfile, relabundfile, groups, label, inputFileName, outputDir, designfile;
41         bool abort;
42         int iters, processors;
43         vector<string> outputNames, Groups;
44         vector<SharedRAbundVector*> lookup;
45         vector<SharedRAbundFloatVector*> lookupFloat;
46         
47         int getShared();
48         int getSharedFloat();
49         int GetIndicatorSpecies(Tree*&);
50         int GetIndicatorSpecies();
51         set<string> getDescendantList(Tree*&, int, map<int, set<string> >, map<int, set<int> >&);
52         vector<float> getValues(vector< vector<SharedRAbundVector*> >&, map< vector<int>, vector<int> >);
53         vector<float> getValues(vector< vector<SharedRAbundFloatVector*> >&, map< vector<int>, vector<int> >);
54         map<int, float> getDistToRoot(Tree*&);
55         map< vector<int>, vector<int> > randomizeGroupings(vector< vector<SharedRAbundVector*> >&, int);
56         map< vector<int>, vector<int> > randomizeGroupings(vector< vector<SharedRAbundFloatVector*> >&, int);
57         vector<float> driver(vector< vector<SharedRAbundFloatVector*> >&, map< vector<int>, vector<int> >, int, vector<float>, int);
58         vector<float> driver(vector< vector<SharedRAbundVector*> >&, map< vector<int>, vector<int> >, int, vector<float>, int);
59         vector<float> getPValues(vector< vector<SharedRAbundFloatVector*> >&, map< vector<int>, vector<int> >, int, vector<float>);
60         vector<float> getPValues(vector< vector<SharedRAbundVector*> >&, map< vector<int>, vector<int> >, int, vector<float>);
61
62         
63 };
64
65
66 #endif
67