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