]> git.donarmstrong.com Git - mothur.git/blob - pcoacommand.h
pca command
[mothur.git] / pcoacommand.h
1 #ifndef PCOACOMMAND_H
2 #define PCOACOMMAND_H
3
4 /*
5  *  pcoacommand.h
6  *  Mothur
7  *
8  *  Created by westcott on 1/4/10.
9  *  Copyright 2010 Schloss Lab. All rights reserved.
10  *
11  */
12  
13 #include "command.hpp"
14 #include "linearalgebra.h"
15
16
17 /*****************************************************************/
18 class PCOACommand : public Command {
19         
20 public:
21         PCOACommand(string);    
22         PCOACommand();
23         ~PCOACommand();
24         vector<string> getRequiredParameters();
25         vector<string> getValidParameters();
26         vector<string> getRequiredFiles();
27         map<string, vector<string> > getOutputFiles() { return outputTypes; }
28         int execute();  
29         void help();
30         
31 private:
32
33         bool abort, metric;
34         string phylipfile, columnfile, namefile, format, filename, fbase, outputDir;
35         float cutoff, precision;
36         vector<string> outputNames;
37         map<string, vector<string> > outputTypes;
38         LinearAlgebra linearCalc;
39         
40         void get_comment(istream&, char, char);
41         int read_phylip(istream&, int, vector<string>&, vector<vector<double> >&);
42         void read(string, vector<string>&, vector<vector<double> >&);
43         void recenter(double, vector<vector<double> >, vector<vector<double> >&);
44         void output(string, vector<string>, vector<vector<double> >&, vector<double>);
45         
46 };
47         
48 /*****************************************************************/
49         
50 #endif
51