]> git.donarmstrong.com Git - mothur.git/blob - rarefactsharedcommand.h
broke up globaldata and moved error checking and help into commands
[mothur.git] / rarefactsharedcommand.h
1 #ifndef RAREFACTSHAREDCOMMAND_H
2 #define RAREFACTSHAREDCOMMAND_H
3 /*
4  *  rarefactsharedcommand.h
5  *  Dotur
6  *
7  *  Created by Sarah Westcott on 1/6/09.
8  *  Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved.
9  *
10  */
11
12 #include "command.hpp"
13 #include "inputdata.h"
14 #include "rarefact.h"
15 #include "display.h"
16 #include "readotu.h"
17 #include "validcalculator.h"
18
19 /* The rarefaction.shared() command:
20         The rarefaction command generates a rarefaction curve from a given file representing several groups.  
21         The rarefaction.shared command can only be executed after a successful read.shared command. It outputs a file for each estimator you choose to use.  
22         The rarefaction.shared command parameters are label, line, iters and sharedrarefaction.  
23         No parameters are required, but you may not use both the line and label  parameters at the same time.  
24         The rarefaction command should be in the following format: rarefaction.shared(label=yourLabel, line=yourLines, iters=yourIters, 
25          sharedrarefaction=yourEstimators).  Example rarefaction.shared(label=unique-.01-.03, line=0,5,10, iters=10000, 
26          sharedrarefaction =sharedobserved).  The default values for 
27         iters is 1000 and sharedrarefaction is sharedobserved which calculates the shared rarefaction curve for the observed richness. 
28          The valid sharedrarefaction estimator is sharedobserved. The label and line parameters are used to analyze specific lines in your input. */
29
30
31 class GlobalData;
32
33 class RareFactSharedCommand : public Command {
34         
35 public:
36         RareFactSharedCommand(string);  
37         ~RareFactSharedCommand();
38         int execute();  
39         void help();
40         
41 private:
42         GlobalData* globaldata;
43         ReadOTUFile* read;
44         vector<SharedRAbundVector*> lookup;
45         InputData* input;
46         ValidCalculators* validCalculator;
47         Rarefact* rCurve;
48         vector<Display*> rDisplays;
49         int freq, nIters;
50         string format;
51         OptionParser* parser;
52         map<string, string> parameters;
53         map<string, string>::iterator it;
54         bool abort, allLines;
55         set<int> lines; //hold lines to be used
56         set<string> labels; //holds labels to be used
57         string line, label, calc, groups;
58         vector<string>  Estimators, Groups;
59
60
61 };
62
63 #endif