]> git.donarmstrong.com Git - mothur.git/blob - collectsharedcommand.h
merged pat's trim seqs edits with sarah's major overhaul of global data; also added...
[mothur.git] / collectsharedcommand.h
1 #ifndef COLLECTSHAREDCOMMAND_H
2 #define COLLECTSHAREDCOMMAND_H
3 /*
4  *  collectsharedcommand.h
5  *  Dotur
6  *
7  *  Created by Sarah Westcott on 1/2/09.
8  *  Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved.
9  *
10  */
11
12
13 #include "command.hpp"
14 #include "sharedordervector.h"
15 #include "sharedlistvector.h"
16 #include "inputdata.h"
17 #include "groupmap.h"
18 #include "collect.h"
19 #include "display.h"
20 #include "readotu.h"
21 #include "validcalculator.h"
22 #include "sharedutilities.h"
23
24 /* The collect.shared() command:
25         The collect command generates a collector's curve from the given file representing several groups.  
26         The collect.shared command can only be executed after a successful read.shared command. 
27         It outputs a file for each estimator you choose to use.  The collect.shared command parameters are label, line, freq and shared.  
28         No parameters are required, but you may not use both the line and label parameters at the same time. 
29         The collect.shared command should be in the following format: collect.shared(label=yourLabel, line=yourLines, 
30         freq=yourFreq, shared=yourEstimators). Example collect.shared(label=unique-.01-.03, line=0,5,10, freq=10, 
31         shared=sharedChao-sharedAce-sharedJabund). The default value for
32         freq is 100 and shared are sharedChao-sharedAce-sharedJabund-sharedSorensonAbund-sharedJclass-sharedSorClass-sharedJest-sharedSorEst-SharedThetaYC-SharedThetaN.  
33         The valid shared estimators are: sharedChao-sharedAce-sharedJabund-sharedSorensonAbund-sharedJclass-sharedSorClass-sharedJest-sharedSorEst-SharedThetaYC-SharedThetaN.  
34         The label and line parameters are used to analyze specific lines in your input. */
35
36
37 class GlobalData;
38
39 class CollectSharedCommand : public Command {
40         
41 public:
42         CollectSharedCommand(string);   
43         ~CollectSharedCommand();
44         int execute();  
45         void help();
46         
47 private:
48         GlobalData* globaldata;
49         SharedUtil* util;
50         GroupMap* groupmap;
51         SharedListVector* SharedList;
52         ReadOTUFile* read;
53         SharedOrderVector* order;
54         InputData* input;
55         ValidCalculators* validCalculator;
56         Collect* cCurve;
57         vector<Display*> cDisplays;
58         int freq;
59         string format;
60
61         bool abort, allLines;
62         set<int> lines; //hold lines to be used
63         set<string> labels; //holds labels to be used
64         string line, label, calc, groups;
65         vector<string>  Estimators, Groups;
66
67
68 };
69
70 #endif