]> git.donarmstrong.com Git - mothur.git/blobdiff - getoturepcommand.h
added pipeline commands which involved change to command factory and command class...
[mothur.git] / getoturepcommand.h
index 8153c3645fc5de028a6a9812426889297991ab85..874e43ce5a8f45178a073b9d8e8e00fa8852deb0 100644 (file)
 
 #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<PCell>::iterator MatData;
+typedef map<int, float> 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<string> getRequiredParameters();
+       vector<string> getValidParameters();
+       vector<string> getRequiredFiles();
+       map<string, vector<string> > 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;
+       set<string> labels; //holds labels to be used
        map<string, int> nameToIndex;  //maps sequence name to index in sparsematrix
-       map<int, string>::iterator it;
-       map<int, string>::iterator it2;
-       map<string, int>::iterator it3;
-       
+       vector<string> outputNames, Groups;
+       map<string, string> outputNameFiles;
+       float cutoff;
+       int precision;
+       vector<SeqMap> seqVec;                  // contains maps with sequence index and distance
+                                                                       // for all distances related to a certain sequence
+       vector<int> rowPositions;
+       map<string, vector<string> > outputTypes;
+
        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<string>);         // returns the name of the "representative" sequence of given bin or subset of a bin, for groups
+       int processNames(string, string);
+                                                                                               
 
 };