X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=pcoacommand.h;h=93feefa3dec06bc6084055fc701a6cd8baf058de;hb=44f3a3c81a34fdee62550d98838a4b421e8df08e;hp=ea1738b9113f967af45f52e0978f4d48dcd1b23f;hpb=1b4b18b3e6fa1436b7cc6dcb14c749ac1ae1bdd8;p=mothur.git diff --git a/pcoacommand.h b/pcoacommand.h index ea1738b..93feefa 100644 --- a/pcoacommand.h +++ b/pcoacommand.h @@ -11,6 +11,7 @@ */ #include "command.hpp" +#include "linearalgebra.h" /*****************************************************************/ @@ -19,33 +20,28 @@ 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 getOutputFileNameTag(string, string); + string getHelpString(); + 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 >&); };