]> git.donarmstrong.com Git - mothur.git/blobdiff - matrixoutputcommand.h
added sequence name to error string in fastq.info. Changed np_shannon to npshannon.
[mothur.git] / matrixoutputcommand.h
index 07743e5b4df6d867323c89c2acd78b241486bd00..ae38b46c5c1d60a1c6c97b5a618f1eca8d59a417 100644 (file)
 #include "command.hpp"
 #include "inputdata.h"
 #include "groupmap.h"
-#include "readotu.h"
 #include "validcalculator.h"
 
 // aka. dist.shared()
 
 /* This command create a tree file for each similarity calculator at distance level, using various calculators to find the similiarity between groups. 
-       The user can select the lines or labels they wish to use as well as the groups they would like included.
+       The user can select the labels they wish to use as well as the groups they would like included.
        They can also use as many or as few calculators as they wish. */
        
-class GlobalData;
 
 class MatrixOutputCommand : public Command {
        
 public:
-       MatrixOutputCommand(string);    
+       MatrixOutputCommand(string);
+       MatrixOutputCommand();  
        ~MatrixOutputCommand();
-       int execute();  
-       void help();
+       
+       vector<string> setParameters();
+       string getCommandName()                 { return "dist.shared";                         }
+       string getCommandCategory()             { return "OTU-Based Approaches";        }
+       string getHelpString(); 
+       string getCitation() { return "http://www.mothur.org/wiki/Dist.shared"; }
+       string getDescription()         { return "generate a distance matrix that describes the dissimilarity among multiple groups"; }
+
+       
+       int execute(); 
+       void help() { m->mothurOut(getHelpString()); }  
        
 private:
-       void printSims(ostream&);
-       void process(vector<SharedRAbundVector*>);
+       struct linePair {
+               int start;
+               int end;
+       };
+       vector<linePair> lines;
+       
+       void printSims(ostream&, vector< vector<float> >&);
+       int process(vector<SharedRAbundVector*>);
        
-       GlobalData* globaldata;
-       ReadOTUFile* read;
        vector<Calculator*> matrixCalculators;
-       vector< vector<float> > simMatrix;
+       //vector< vector<float> > simMatrix;
        InputData* input;
-       ValidCalculators* validCalculator;
        vector<SharedRAbundVector*> lookup;
-       string exportFileName;
-       int numGroups;
+       string exportFileName, output, sharedfile;
+       int numGroups, processors;
        ofstream out;
 
        bool abort, allLines;
-       set<int> lines; //hold lines to be used
        set<string> labels; //holds labels to be used
-       string outputFile, calc, groups, line, label;
-       vector<string>  Estimators, Groups; //holds estimators to be used
-       
+       string outputFile, calc, groups, label, outputDir;
+       vector<string>  Estimators, Groups, outputNames; //holds estimators to be used
+       int process(vector<SharedRAbundVector*>, string, string);
+       int driver(vector<SharedRAbundVector*>, int, int, vector< vector<seqDist> >&);
 
 };