]> git.donarmstrong.com Git - mothur.git/blob - rarefactsharedcommand.h
sffinfo bug with flow grams right index when clipQualRight=0
[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 "validcalculator.h"
17
18 class RareFactSharedCommand : public Command {
19         
20 public:
21         RareFactSharedCommand(string);
22         RareFactSharedCommand();
23         ~RareFactSharedCommand() {}
24         
25         vector<string> setParameters();
26         string getCommandName()                 { return "rarefaction.shared";          }
27         string getCommandCategory()             { return "OTU-Based Approaches";        }
28         
29         string getHelpString(); 
30     string getOutputPattern(string);    
31         string getCitation() { return "Magurran AE (2004). Measuring biological diversity. Blackwell Pub.: Malden, Ma. \nhttp://www.mothur.org/wiki/Rarefaction.shared"; }
32         string getDescription()         { return "generate inter-sample rarefaction curves using a re-sampling without replacement approach"; }
33
34         int execute(); 
35         void help() { m->mothurOut(getHelpString()); }  
36         
37         
38 private:
39         
40         vector<SharedRAbundVector*> lookup;
41         int nIters, subsampleSize, iters;
42         string format;
43         float freq;
44         
45      map<int, string> file2Group; //index in outputNames[i] -> group
46         bool abort, allLines, jumble, groupMode, subsample;
47         set<string> labels; //holds labels to be used
48         string label, calc, groups, outputDir, sharedfile, designfile;
49         vector<string>  Estimators, Groups, outputNames, Sets;
50     
51     int process(GroupMap&, string);
52     vector<string> createGroupFile(vector<string>&);
53     int subsampleLookup(vector<SharedRAbundVector*>&, string);
54
55 };
56
57 #endif