X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=getoturepcommand.h;h=8099a3998c1a63de92d9c72b2c5419c08e2f96ff;hb=a8367302932de9be5434e77f6e5829d7609e2aec;hp=4e2b3a0e685aec843624613df7bda5c7e184b4c1;hpb=c5c7502f435e1413c19e373dab1dfebcaa67588d;p=mothur.git diff --git a/getoturepcommand.h b/getoturepcommand.h index 4e2b3a0..8099a39 100644 --- a/getoturepcommand.h +++ b/getoturepcommand.h @@ -13,44 +13,66 @@ #include "command.hpp" #include "globaldata.hpp" -#include "sparsematrix.hpp" #include "listvector.hpp" #include "inputdata.h" -#include "readmatrix.hpp" +#include "readotu.h" #include "fastamap.h" - - -class GlobalData; +#include "groupmap.h" +#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(); - int execute(); - + int execute(); + void help(); + private: GlobalData* globaldata; - SparseMatrix* matrix; ListVector* list; - ListVector* listOfNames; - ReadMatrix* read; + ReadOTUFile* read; InputData* input; FastaMap* fasta; - string filename, fastafile, namesfile; + GroupMap* groupMap; + 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; - - + 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(); - string FindRep(int); // returns name of "representative" sequence of given bin. + 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); + };