]> git.donarmstrong.com Git - mothur.git/blobdiff - pcacommand.h
changing command name classify.shared to classifyrf.shared
[mothur.git] / pcacommand.h
index 220e91f162e75b9b5d5f9d75ecfc6e3474e50549..482ecc3fecf678cca5853eb9c1160f005204a604 100644 (file)
@@ -3,45 +3,54 @@
 
 /*
  *  pcacommand.h
- *  Mothur
+ *  mothur
  *
- *  Created by westcott on 1/4/10.
- *  Copyright 2010 Schloss Lab. All rights reserved.
+ *  Created by westcott on 1/7/11.
+ *  Copyright 2011 Schloss Lab. All rights reserved.
  *
  */
-#include "command.hpp"
 
+#include "command.hpp"
+#include "linearalgebra.h"
+#include "sharedrabundfloatvector.h"
 
 /*****************************************************************/
 class PCACommand : public Command {
        
 public:
        PCACommand(string);     
-       ~PCACommand();
-       int execute();  
-       void help();
+       PCACommand();
+       ~PCACommand() {}
+       
+       vector<string> setParameters();
+       string getCommandName()                 { return "pca";                                 }
+       string getCommandCategory()             { return "Hypothesis Testing";  }
+       
+       string getHelpString(); 
+    string getOutputPattern(string);   
+       string getCitation() { return "McCune B, Grace JB, Urban DL (2002). Analysis of ecological communities. MjM Software Design: Gleneden Beach, OR. \nLegendre P, Legendre L (1998). Numerical Ecology. Elsevier: New York. \nhttp://www.mothur.org/wiki/Pca"; }
+       string getDescription()         { return "pca"; }
+
+       int execute(); 
+       void help() { m->mothurOut(getHelpString()); }  
+       
        
 private:
 
-       bool abort;
-       string phylipfile, columnfile, namefile, format, filename, fbase, outputDir;
-       float cutoff, precision;
-       vector<string> outputNames;
+       bool abort, metric;
+       string outputDir, mode, inputFile, label, groups, sharedfile, relabundfile;
+       vector<string> outputNames, Groups;
+       set<string> labels;
+       LinearAlgebra linearCalc;
        
-       void get_comment(istream&, char, char);
-       void read_phylip(istream&, int, vector<string>&, vector<vector<double> >&);
-       void read(string, vector<string>&, vector<vector<double> >&);
-       double pythag(double, double);
-       void matrix_mult(vector<vector<double> >, vector<vector<double> >, vector<vector<double> >&);
-       void recenter(double, vector<vector<double> >, vector<vector<double> >&);
-       void tred2(vector<vector<double> >&, vector<double>&, vector<double>&);
-       void qtli(vector<double>&, vector<double>&, vector<vector<double> >&);
-       void output(string, vector<string>, vector<vector<double> >, vector<double>);
+       //vector< vector<double> > createMatrix(vector<SharedRAbundFloatVector*>);
+       int process(vector<SharedRAbundFloatVector*>&);
+       void output(string, string, vector<string>, vector<vector<double> >&, vector<double>);
        
 };
-       
+
 /*****************************************************************/
-       
+
 #endif
 
+