]> git.donarmstrong.com Git - mothur.git/blobdiff - getoturepcommand.h
removed read.dist, read.otu, read.tree and globaldata. added current to defaults...
[mothur.git] / getoturepcommand.h
index 8099a3998c1a63de92d9c72b2c5419c08e2f96ff..d8f8f0905ba3c3e8c09dfb8ec83ec34f817db89e 100644 (file)
  /* The get.oturep command outputs a .fastarep file for each distance you specify, selecting one OTU representative for each bin. */
 
 #include "command.hpp"
-#include "globaldata.hpp"
 #include "listvector.hpp"
 #include "inputdata.h"
-#include "readotu.h"
 #include "fastamap.h"
 #include "groupmap.h"
 #include "readmatrix.hpp"
@@ -39,14 +37,20 @@ class GetOTURepCommand : public Command {
 
 public:
        GetOTURepCommand(string);
-       ~GetOTURepCommand();
-       int execute();
-       void help();
-
+       GetOTURepCommand();
+       ~GetOTURepCommand(){}
+       
+       vector<string> setParameters();
+       string getCommandName()                 { return "get.oturep";                          }
+       string getCommandCategory()             { return "OTU-Based Approaches";        }
+       string getHelpString(); 
+       
+       int execute(); 
+       void help() { m->mothurOut(getHelpString()); }  
+       
+       
 private:
-       GlobalData* globaldata;
        ListVector* list;
-       ReadOTUFile* read;
        InputData* input;
        FastaMap* fasta;
        GroupMap* groupMap;
@@ -56,9 +60,10 @@ private:
        string filename, fastafile, listfile, namefile, groupfile, label, sorted, phylipfile, columnfile, distFile, format, outputDir, groups;
        ofstream out;
        ifstream in, inNames, inRow;
-       bool abort, allLines, groupError, large;
+       bool abort, allLines, groupError, large, weighted;
        set<string> labels; //holds labels to be used
        map<string, int> nameToIndex;  //maps sequence name to index in sparsematrix
+       map<string, string> nameFileMap;
        vector<string> outputNames, Groups;
        map<string, string> outputNameFiles;
        float cutoff;
@@ -68,12 +73,11 @@ private:
        vector<int> rowPositions;
 
        void readNamesFile();
+       void readNamesFile(bool);
        int process(ListVector*);
        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);
-                                                                                               
-
 };
 
 #endif