]> git.donarmstrong.com Git - mothur.git/blob - corraxescommand.h
pca command
[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 struct spearmanRank {
19         string name;
20         float score;
21         
22         spearmanRank(string n, float s) : name(n), score(s) {}
23 };
24 /***************************************************************/
25
26 class CorrAxesCommand : public Command {
27 public:
28         CorrAxesCommand(string);
29         CorrAxesCommand();
30         ~CorrAxesCommand();
31         vector<string> getRequiredParameters();
32         vector<string> getValidParameters();
33         vector<string> getRequiredFiles();
34         map<string, vector<string> > getOutputFiles() { return outputTypes; }
35         int execute();
36         void help();
37         
38 private:
39         
40         
41         GlobalData* globaldata;
42         string axesfile, sharedfile, relabundfile, metadatafile, groups, label, inputFileName, outputDir, method;
43         bool abort, pickedGroups;
44         int numaxes;
45         set<string> names;
46         
47         vector<string> outputNames, Groups;
48         map<string, vector<string> > outputTypes;
49         vector<SharedRAbundFloatVector*> lookupFloat;
50         vector<string> metadataLabels;
51         
52         int getSharedFloat(InputData*);
53         int getMetadata();
54         int eliminateZeroOTUS(vector<SharedRAbundFloatVector*>&);
55         map<string, vector<float> > readAxes();
56         int calcPearson(map<string, vector<float> >&, ofstream&);
57         int calcSpearman(map<string, vector<float> >&, ofstream&);
58         int calcKendall(map<string, vector<float> >&, ofstream&);
59         
60 };
61
62
63 #endif
64
65