X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=getoturepcommand.h;h=8099a3998c1a63de92d9c72b2c5419c08e2f96ff;hb=4745a956b3116a719f52f341d2a2db84df4817da;hp=f413d4f51f2a9c45e3a5d17dd0243a825eb71679;hpb=0470f6d037aacb3563c3f7010708120a4a67d4e6;p=mothur.git diff --git a/getoturepcommand.h b/getoturepcommand.h index f413d4f..8099a39 100644 --- a/getoturepcommand.h +++ b/getoturepcommand.h @@ -13,51 +13,66 @@ #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(string); + GetOTURepCommand(string); ~GetOTURepCommand(); int execute(); - void help(); - + void help(); + private: GlobalData* globaldata; - SparseMatrix* matrix; ListVector* list; ReadOTUFile* read; InputData* input; FastaMap* fasta; GroupMap* groupMap; - string filename, fastafile, listfile, namesfile, groupfile, line, label; + 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; - OptionParser* parser; - map parameters; - map::iterator it4; - bool abort, allLines; - set lines; //hold lines to be used + ifstream in, inNames, inRow; + bool abort, allLines, groupError, large; 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; - + 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; + void readNamesFile(); 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); + };