]> git.donarmstrong.com Git - mothur.git/blob - indicatorcommand.h
sffinfo bug with flow grams right index when clipQualRight=0
[mothur.git] / 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 "counttable.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         
30         string getHelpString(); 
31     string getOutputPattern(string);    
32         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"; }
33         string getDescription()         { return "calculate the indicator value for each OTU"; }
34
35         int execute();
36         void help() { m->mothurOut(getHelpString()); }  
37         
38 private:
39         ReadTree* read;
40         CountTable* ct;
41         GroupMap* designMap;
42         string treefile, sharedfile, relabundfile, groups, label, inputFileName, outputDir, designfile;
43         bool abort;
44         int iters, processors;
45         vector<string> outputNames, Groups;
46         vector<SharedRAbundVector*> lookup;
47         vector<SharedRAbundFloatVector*> lookupFloat;
48         
49         int getShared();
50         int getSharedFloat();
51         int GetIndicatorSpecies(Tree*&);
52         int GetIndicatorSpecies();
53         set<string> getDescendantList(Tree*&, int, map<int, set<string> >, map<int, set<int> >&);
54         vector<float> getValues(vector< vector<SharedRAbundVector*> >&, vector<string>&, map< vector<int>, vector<int> >);
55         vector<float> getValues(vector< vector<SharedRAbundFloatVector*> >&, vector<string>&, map< vector<int>, vector<int> >);
56     
57         map<int, float> getDistToRoot(Tree*&);
58         map< vector<int>, vector<int> > randomizeGroupings(vector< vector<SharedRAbundVector*> >&, int);
59         map< vector<int>, vector<int> > randomizeGroupings(vector< vector<SharedRAbundFloatVector*> >&, int);
60     
61         vector<float> driver(vector< vector<SharedRAbundFloatVector*> >&, map< vector<int>, vector<int> >, int, vector<float>, int);
62         vector<float> driver(vector< vector<SharedRAbundVector*> >&, map< vector<int>, vector<int> >, int, vector<float>, int);
63     
64         vector<float> getPValues(vector< vector<SharedRAbundFloatVector*> >&, map< vector<int>, vector<int> >, int, vector<float>);
65         vector<float> getPValues(vector< vector<SharedRAbundVector*> >&, map< vector<int>, vector<int> >, int, vector<float>);
66
67         
68 };
69
70
71 #endif
72