X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=getoturepcommand.h;h=7a17c9de22a4c08b8d44a6e59ea3c6f07f18430a;hb=37eac2026d91179acda0494c4dcca22f176551b9;hp=8153c3645fc5de028a6a9812426889297991ab85;hpb=a8f5a612bba54ceb74e17efc027d3a7f5aa93c9a;p=mothur.git diff --git a/getoturepcommand.h b/getoturepcommand.h index 8153c36..7a17c9d 100644 --- a/getoturepcommand.h +++ b/getoturepcommand.h @@ -13,47 +13,74 @@ #include "command.hpp" #include "globaldata.hpp" -#include "sparsematrix.hpp" #include "listvector.hpp" #include "inputdata.h" #include "readotu.h" #include "fastamap.h" #include "groupmap.h" - -class GlobalData; +#include "readmatrix.hpp" +#include "formatmatrix.h" typedef list::iterator MatData; +typedef map SeqMap; + +struct repStruct { + string name; + int bin; + int size; + string group; + + repStruct(){} + repStruct(string n, int b, int s, string g) : name(n), bin(b), size(s), group(g) {} + ~repStruct() {} +}; class GetOTURepCommand : public Command { - + public: - GetOTURepCommand(); + GetOTURepCommand(string); + GetOTURepCommand(); ~GetOTURepCommand(); - int execute(); - + vector getRequiredParameters(); + vector getValidParameters(); + vector getRequiredFiles(); + map > getOutputFiles() { return outputTypes; } + int execute(); + void help(); + private: GlobalData* globaldata; - SparseMatrix* matrix; ListVector* list; - ListVector* listOfNames; ReadOTUFile* read; InputData* input; FastaMap* fasta; GroupMap* groupMap; - string filename, fastafile, namesfile, groupfile; + ReadMatrix* readMatrix; + FormatMatrix* formatMatrix; + NameAssignment* nameMap; + string filename, fastafile, listfile, namefile, groupfile, label, sorted, phylipfile, columnfile, distFile, format, outputDir, groups; ofstream out; - ifstream in, inNames; - bool groupError; - - + ifstream in, inNames, inRow; + bool abort, allLines, groupError, large, weighted; + set labels; //holds labels to be used map nameToIndex; //maps sequence name to index in sparsematrix - map::iterator it; - map::iterator it2; - map::iterator it3; - + map nameFileMap; + vector outputNames, Groups; + map outputNameFiles; + float cutoff; + int precision; + 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*); - string FindRep(int, string&, ListVector*); // returns name of "representative" sequence of given bin. //and fill a string containing the groups in that bin if a groupfile is given + 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); + };