]> git.donarmstrong.com Git - mothur.git/blobdiff - getoturepcommand.h
added logfile feature
[mothur.git] / getoturepcommand.h
index 37c4194a8c16e0664d7cb834b4777c054b61268d..4f755d0fccfe68dd1e03b5b36d57ce4b76287df9 100644 (file)
 #include "fastamap.h"
 #include "groupmap.h"
 
-class GlobalData;
-
 typedef list<PCell>::iterator MatData;
+typedef map<int, float> SeqMap;
 
 class GetOTURepCommand : public Command {
-       
+
 public:
-       GetOTURepCommand(string);       
+       GetOTURepCommand(string);
        ~GetOTURepCommand();
        int execute();
-       void help();    
-       
+       void help();
+
 private:
        GlobalData* globaldata;
        SparseMatrix* matrix;
@@ -44,15 +43,21 @@ private:
        ofstream out;
        ifstream in, inNames;
        bool groupError;
-       
+
        bool abort, allLines;
        set<int> lines; //hold lines to be used
        set<string> labels; //holds labels to be used
        map<string, int> nameToIndex;  //maps sequence name to index in sparsematrix
-       
+
+       vector<SeqMap> seqVec;                  // contains maps with sequence index and distance
+                                                                       // for all distances related to a certain sequence
+
+
        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
+       string findRep(int, string&, ListVector*, int&);        // returns the name of the "representative" sequence of given bin, 
+                                                                       // fills a string containing the groups in that bin if a groupfile is given,
+                                                                       // and returns the number of sequences in the given bin
 
 };