]> git.donarmstrong.com Git - mothur.git/blob - corraxescommand.h
added load.logfile command. changed summary.single output for subsample=t.
[mothur.git] / corraxescommand.h
1 #ifndef CORRAXESCOMMAND_H
2 #define CORRAXESCOMMAND_H
3
4 /*
5  *  corraxescommand.h
6  *  Mothur
7  *
8  *  Created by westcott on 12/22/10.
9  *  Copyright 2010 Schloss Lab. All rights reserved.
10  *
11  */
12
13 #include "command.hpp"
14 #include "sharedrabundfloatvector.h"
15 #include "inputdata.h"
16
17
18 class CorrAxesCommand : public Command {
19 public:
20         CorrAxesCommand(string);
21         CorrAxesCommand();
22         ~CorrAxesCommand(){}
23         
24         vector<string> setParameters();
25         string getCommandName()                 { return "corr.axes";                           }
26         string getCommandCategory()             { return "Hypothesis Testing";          }
27         string getOutputFileNameTag(string, string);
28         string getHelpString(); 
29         string getCitation() { return "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/Corr.axes"; }
30         string getDescription()         { return "calculate the correlation coefficient for each column in a shared/relabund file to the axes displayed in a pcoa file"; }
31         
32         int execute();
33         void help() { m->mothurOut(getHelpString()); }  
34 private:
35
36         string axesfile, sharedfile, relabundfile, metadatafile, groups, label, inputFileName, outputDir, method;
37         bool abort, pickedGroups;
38         int numaxes;
39         set<string> names;
40         
41         vector<string> outputNames, Groups;
42         vector<SharedRAbundFloatVector*> lookupFloat;
43         vector<string> metadataLabels;
44         
45         int getSharedFloat(InputData*);
46         int getMetadata();
47         int eliminateZeroOTUS(vector<SharedRAbundFloatVector*>&);
48         map<string, vector<float> > readAxes();
49         int calcPearson(map<string, vector<float> >&, ofstream&);
50         int calcSpearman(map<string, vector<float> >&, ofstream&);
51         int calcKendall(map<string, vector<float> >&, ofstream&);
52         
53 };
54
55
56 #endif
57
58