]> git.donarmstrong.com Git - mothur.git/blob - rarefactcommand.h
Merge remote-tracking branch 'mothur/master'
[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 "command.hpp"
13 #include "ordervector.hpp"
14 #include "inputdata.h"
15 #include "rarefact.h"
16 #include "display.h"
17 #include "validcalculator.h"
18
19 class RareFactCommand : public Command {
20         
21 public:
22         RareFactCommand(string);
23         RareFactCommand();      
24         ~RareFactCommand(){}
25         
26         vector<string> setParameters();
27         string getCommandName()                 { return "rarefaction.single";          }
28         string getCommandCategory()             { return "OTU-Based Approaches";        }
29         string getOutputFileNameTag(string, string);
30         string getHelpString(); 
31         string getCitation() { return "Magurran AE (2004). Measuring biological diversity. Blackwell Pub.: Malden, Ma. \nhttp://www.mothur.org/wiki/Rarefaction.single"; }
32         string getDescription()         { return "generate intra-sample rarefaction curves using a re-sampling without replacement approach"; }
33
34         int execute(); 
35         void help() { m->mothurOut(getHelpString()); }  
36         
37 private:
38         
39         vector<Display*> rDisplays;
40         OrderVector* order;
41         InputData* input;
42         Rarefact* rCurve;
43         int nIters, abund, processors;
44         float freq;
45         
46         bool abort, allLines, groupMode;
47         set<string> labels; //holds labels to be used
48         string label, calc, sharedfile, listfile, rabundfile, sabundfile, format, inputfile;
49         vector<string>  Estimators;
50         vector<string> inputFileNames, outputNames;
51         vector<string> groups;
52         string outputDir;
53         
54         vector<string> parseSharedFile(string, map<string, set<int> >&);
55         vector<string> createGroupFile(vector<string>&, map<int, string>);
56 };
57
58 #endif