]> git.donarmstrong.com Git - mothur.git/blob - matrixoutputcommand.h
added command descriptions
[mothur.git] / matrixoutputcommand.h
1 #ifndef MATRIXOUTPUTCOMMAND_H
2 #define MATRIXOUTPUTCOMMAND_H
3
4 /*
5  *  matrixoutputcommand.h
6  *  Mothur
7  *
8  *  Created by Sarah Westcott on 5/20/09.
9  *  Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved.
10  *
11  */ 
12 #include "command.hpp"
13 #include "inputdata.h"
14 #include "groupmap.h"
15 #include "validcalculator.h"
16
17 // aka. dist.shared()
18
19 /* This command create a tree file for each similarity calculator at distance level, using various calculators to find the similiarity between groups. 
20         The user can select the labels they wish to use as well as the groups they would like included.
21         They can also use as many or as few calculators as they wish. */
22         
23
24 class MatrixOutputCommand : public Command {
25         
26 public:
27         MatrixOutputCommand(string);
28         MatrixOutputCommand();  
29         ~MatrixOutputCommand();
30         
31         vector<string> setParameters();
32         string getCommandName()                 { return "dist.shared";                         }
33         string getCommandCategory()             { return "OTU-Based Approaches";        }
34         string getHelpString(); 
35         string getCitation() { return "http://www.mothur.org/wiki/Dist.shared"; }
36         string getDescription()         { return "generate a distance matrix that describes the dissimilarity among multiple groups"; }
37
38         
39         int execute(); 
40         void help() { m->mothurOut(getHelpString()); }  
41         
42 private:
43         struct linePair {
44                 int start;
45                 int end;
46         };
47         vector<linePair> lines;
48         
49         void printSims(ostream&, vector< vector<float> >&);
50         int process(vector<SharedRAbundVector*>);
51         
52         vector<Calculator*> matrixCalculators;
53         //vector< vector<float> > simMatrix;
54         InputData* input;
55         vector<SharedRAbundVector*> lookup;
56         string exportFileName, output, sharedfile;
57         int numGroups, processors;
58         ofstream out;
59
60         bool abort, allLines;
61         set<string> labels; //holds labels to be used
62         string outputFile, calc, groups, label, outputDir;
63         vector<string>  Estimators, Groups, outputNames; //holds estimators to be used
64         int process(vector<SharedRAbundVector*>, string, string);
65         int driver(vector<SharedRAbundVector*>, int, int, vector< vector<seqDist> >&);
66
67 };
68         
69         
70 #endif
71