]> git.donarmstrong.com Git - mothur.git/blob - rarefactcommand.h
added read.shared, broke up globaldata a bit
[mothur.git] / rarefactcommand.h
1 #ifndef RAREFACTCOMMAND_H
2 #define RAREFACTCOMMAND_H
3 /*
4  *  rarefactcommand.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 #include <iostream>
13 #include <fstream>
14 #include <vector>
15 #include "command.hpp"
16 #include "ordervector.hpp"
17 #include "inputdata.h"
18 #include "rarefact.h"
19 #include "display.h"
20 #include "readmatrix.hpp"
21 #include "validcalculator.h"
22
23
24 /*The rarefaction() command:
25         The rarefaction command generates a rarefaction curve from a given file.  
26         The rarefaction command can only be executed after a successful read.list, read.sabund or read.rabund command, with one exception. 
27         The rarefaction command can be executed after a successful cluster command.  It will use the .list file from the output of the cluster. 
28         The rarefaction command outputs a file for each estimator you choose to use.  It is recommended to only use rarefaction estimator.  
29         The rarefaction command parameters are label, line, iters, freq, rarefaction.  No parameters are required, 
30         but you may not use both the line and label  parameters at the same time. The rarefaction command should be in the following format: 
31         rarefaction(label=yourLabel, line=yourLines, iters=yourIters, freq=yourFreq, rarefaction=yourEstimators). 
32         Example rarefaction(label=unique-.01-.03, line=0,5,10, iters=10000, freq=10, rarefaction=rarefaction-rchao-race-rjack-rbootstrap-rshannon-rnpshannon-rsimpson). 
33         The default values for iters is 1000, freq is 100, and rarefaction is rarefaction which calculates the rarefaction curve for the observed richness. 
34         The valid rarefaction estimators are: rarefaction-rchao-race-rjack-rbootstrap-rshannon-rnpshannon-rsimpson.  
35         Rarefaction is the only recommended estimator.  The label and line parameters are used to analyze specific lines in your input. */
36         
37
38 class GlobalData;
39
40 class RareFactCommand : public Command {
41         
42 public:
43         RareFactCommand();      
44         ~RareFactCommand();
45         int execute();  
46         
47 private:
48         GlobalData* globaldata;
49         vector<Display*> rDisplays;
50         ReadMatrix* read;
51         OrderVector* order;
52         InputData* input;
53         ValidCalculators* validCalculator;
54         Rarefact* rCurve;
55         int freq, nIters;
56 };
57
58 #endif