X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=getoturepcommand.h;h=a1bf3f0229a98231e9a627e4fc98f9d23ad897ea;hb=2a29fceeeb8754c3fd97ba830d2fbed5c4349ee8;hp=874e43ce5a8f45178a073b9d8e8e00fa8852deb0;hpb=8bc3e5b38c2317a1715f53be22fa96455868c281;p=mothur.git diff --git a/getoturepcommand.h b/getoturepcommand.h index 874e43c..a1bf3f0 100644 --- a/getoturepcommand.h +++ b/getoturepcommand.h @@ -12,16 +12,14 @@ /* 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" #include "formatmatrix.h" +#include "counttable.h" -typedef list::iterator MatData; typedef map SeqMap; struct repStruct { @@ -40,30 +38,38 @@ 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 getHelpString(); + string getOutputPattern(string); + 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; ReadMatrix* readMatrix; FormatMatrix* formatMatrix; NameAssignment* nameMap; - string filename, fastafile, listfile, namefile, groupfile, label, sorted, phylipfile, columnfile, distFile, format, outputDir, groups; + CountTable ct; + string filename, fastafile, listfile, namefile, groupfile, label, sorted, phylipfile, countfile, columnfile, distFile, format, outputDir, groups; ofstream out; ifstream in, inNames, inRow; - bool abort, allLines, groupError, large; + bool abort, allLines, groupError, large, weighted, hasGroups; 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 +77,15 @@ 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 + string findRep(vector, string); // 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); + int readDist(); }; #endif