]> git.donarmstrong.com Git - mothur.git/blob - pcacommand.h
added pipeline commands which involved change to command factory and command class...
[mothur.git] / pcacommand.h
1 #ifndef PCACOMMAND_H
2 #define PCACOMMAND_H
3
4 /*
5  *  pcacommand.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
15
16 /*****************************************************************/
17 class PCACommand : public Command {
18         
19 public:
20         PCACommand(string);     
21         PCACommand();
22         ~PCACommand();
23         vector<string> getRequiredParameters();
24         vector<string> getValidParameters();
25         vector<string> getRequiredFiles();
26         map<string, vector<string> > getOutputFiles() { return outputTypes; }
27         int execute();  
28         void help();
29         
30 private:
31
32         bool abort;
33         string phylipfile, columnfile, namefile, format, filename, fbase, outputDir;
34         float cutoff, precision;
35         vector<string> outputNames;
36         map<string, vector<string> > outputTypes;
37         
38         void get_comment(istream&, char, char);
39         int read_phylip(istream&, int, vector<string>&, vector<vector<double> >&);
40         void read(string, vector<string>&, vector<vector<double> >&);
41         double pythag(double, double);
42         void matrix_mult(vector<vector<double> >, vector<vector<double> >, vector<vector<double> >&);
43         void recenter(double, vector<vector<double> >, vector<vector<double> >&);
44         void tred2(vector<vector<double> >&, vector<double>&, vector<double>&);
45         void qtli(vector<double>&, vector<double>&, vector<vector<double> >&);
46         void output(string, vector<string>, vector<vector<double> >, vector<double>);
47         
48 };
49         
50 /*****************************************************************/
51         
52 #endif
53