]> git.donarmstrong.com Git - mothur.git/blob - corraxescommand.h
added template=self capability to chimers.slayer, worked on corr.axes and added accno...
[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         
53         int getShared();
54         int getSharedFloat();
55         int convertToRelabund();
56         int eliminateZeroOTUS(vector<SharedRAbundFloatVector*>&);
57         map<string, vector<float> > readAxes();
58         int calcPearson(map<string, vector<float> >&, ofstream&);
59         int calcSpearman(map<string, vector<float> >&, ofstream&);
60         int calcKendall(map<string, vector<float> >&, ofstream&);
61         
62 };
63
64
65 #endif
66
67