X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=getoturepcommand.h;h=5af0340b4b920a4fab3decc79bd2b3b4237f85ef;hb=f06b339c5fc4b6d1b9d2a08fe16bf7670bf7aeb4;hp=874e43ce5a8f45178a073b9d8e8e00fa8852deb0;hpb=8bc3e5b38c2317a1715f53be22fa96455868c281;p=mothur.git diff --git a/getoturepcommand.h b/getoturepcommand.h index 874e43c..5af0340 100644 --- a/getoturepcommand.h +++ b/getoturepcommand.h @@ -12,10 +12,8 @@ /* The get.oturep command outputs a .fastarep file for each distance you specify, selecting one OTU representative for each bin. */ #include "command.hpp" -#include "globaldata.hpp" #include "listvector.hpp" #include "inputdata.h" -#include "readotu.h" #include "fastamap.h" #include "groupmap.h" #include "readmatrix.hpp" @@ -40,18 +38,23 @@ class GetOTURepCommand : public Command { public: GetOTURepCommand(string); GetOTURepCommand(); - ~GetOTURepCommand(); - vector getRequiredParameters(); - vector getValidParameters(); - vector getRequiredFiles(); - map > getOutputFiles() { return outputTypes; } - int execute(); - void help(); + ~GetOTURepCommand(){} + + vector setParameters(); + string getCommandName() { return "get.oturep"; } + string getCommandCategory() { return "OTU-Based Approaches"; } + string getOutputFileNameTag(string, string); + string getHelpString(); + string getCitation() { return "http://www.mothur.org/wiki/Get.oturep"; } + string getDescription() { return "gets a representative sequence for each OTU"; } + + int execute(); + void help() { m->mothurOut(getHelpString()); } + + private: - GlobalData* globaldata; ListVector* list; - ReadOTUFile* read; InputData* input; FastaMap* fasta; GroupMap* groupMap; @@ -61,9 +64,10 @@ private: string filename, fastafile, listfile, namefile, groupfile, label, sorted, phylipfile, columnfile, distFile, format, outputDir, groups; ofstream out; ifstream in, inNames, inRow; - bool abort, allLines, groupError, large; + bool abort, allLines, groupError, large, weighted; set labels; //holds labels to be used map nameToIndex; //maps sequence name to index in sparsematrix + map nameFileMap; vector outputNames, Groups; map outputNameFiles; float cutoff; @@ -71,15 +75,14 @@ private: vector seqVec; // contains maps with sequence index and distance // for all distances related to a certain sequence vector rowPositions; - map > outputTypes; void readNamesFile(); + void readNamesFile(bool); int process(ListVector*); SeqMap getMap(int); string findRep(vector); // returns the name of the "representative" sequence of given bin or subset of a bin, for groups int processNames(string, string); - - + int processFastaNames(string, string); }; #endif