]> git.donarmstrong.com Git - mothur.git/blob - matrixoutputcommand.h
paralellized seq.error and dist.shared added some error checks to libshuff and dist...
[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         
37         int execute(); 
38         void help() { m->mothurOut(getHelpString()); }  
39         
40 private:
41         struct linePair {
42                 int start;
43                 int end;
44         };
45         vector<linePair> lines;
46         
47         void printSims(ostream&, vector< vector<float> >&);
48         int process(vector<SharedRAbundVector*>);
49         
50         vector<Calculator*> matrixCalculators;
51         //vector< vector<float> > simMatrix;
52         InputData* input;
53         vector<SharedRAbundVector*> lookup;
54         string exportFileName, output, sharedfile;
55         int numGroups, processors;
56         ofstream out;
57
58         bool abort, allLines;
59         set<string> labels; //holds labels to be used
60         string outputFile, calc, groups, label, outputDir;
61         vector<string>  Estimators, Groups, outputNames; //holds estimators to be used
62         int process(vector<SharedRAbundVector*>, string, string);
63         int driver(vector<SharedRAbundVector*>, int, int, vector< vector<seqDist> >&);
64
65 };
66         
67         
68 #endif
69