X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=pcoacommand.h;h=29957f1140e81517cc5a244a696eba7aaf1db49a;hp=ea1738b9113f967af45f52e0978f4d48dcd1b23f;hb=1a20e24ee786195ab0e1cccd4f5aede7a88f3f4e;hpb=1b4b18b3e6fa1436b7cc6dcb14c749ac1ae1bdd8 diff --git a/pcoacommand.h b/pcoacommand.h index ea1738b..29957f1 100644 --- a/pcoacommand.h +++ b/pcoacommand.h @@ -11,6 +11,7 @@ */ #include "command.hpp" +#include "linearalgebra.h" /*****************************************************************/ @@ -19,33 +20,29 @@ class PCOACommand : public Command { public: PCOACommand(string); PCOACommand(); - ~PCOACommand(); - vector getRequiredParameters(); - vector getValidParameters(); - vector getRequiredFiles(); - map > getOutputFiles() { return outputTypes; } - int execute(); - void help(); + ~PCOACommand(){} + + vector setParameters(); + string getCommandName() { return "pcoa"; } + 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/Pcoa"; } + string getDescription() { return "pcoa"; } + + int execute(); + void help() { m->mothurOut(getHelpString()); } private: bool abort, metric; - string phylipfile, columnfile, namefile, format, filename, fbase, outputDir; - float cutoff, precision; + string phylipfile, filename, fbase, outputDir; vector outputNames; - map > outputTypes; + LinearAlgebra linearCalc; void get_comment(istream&, char, char); - int read_phylip(istream&, int, vector&, vector >&); - void read(string, vector&, vector >&); - double pythag(double, double); - void matrix_mult(vector >, vector >, vector >&); - void recenter(double, vector >, vector >&); - void tred2(vector >&, vector&, vector&); - void qtli(vector&, vector&, vector >&); void output(string, vector, vector >&, vector); - vector< vector > calculateEuclidianDistance(vector >&, int); - double calcPearson(vector >&, vector >&); };