1 #ifndef RAREFACTSHAREDCOMMAND_H
2 #define RAREFACTSHAREDCOMMAND_H
4 * rarefactsharedcommand.h
7 * Created by Sarah Westcott on 1/6/09.
8 * Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved.
12 #include "command.hpp"
13 #include "inputdata.h"
16 #include "validcalculator.h"
18 class RareFactSharedCommand : public Command {
21 RareFactSharedCommand(string);
22 RareFactSharedCommand();
23 ~RareFactSharedCommand() {}
25 vector<string> setParameters();
26 string getCommandName() { return "rarefaction.shared"; }
27 string getCommandCategory() { return "OTU-Based Approaches"; }
28 string getOutputFileNameTag(string, string);
29 string getHelpString();
30 string getCitation() { return "Magurran AE (2004). Measuring biological diversity. Blackwell Pub.: Malden, Ma. \nhttp://www.mothur.org/wiki/Rarefaction.shared"; }
31 string getDescription() { return "generate inter-sample rarefaction curves using a re-sampling without replacement approach"; }
34 void help() { m->mothurOut(getHelpString()); }
39 vector<SharedRAbundVector*> lookup;
40 int nIters, subsampleSize, iters;
44 map<int, string> file2Group; //index in outputNames[i] -> group
45 bool abort, allLines, jumble, groupMode, subsample;
46 set<string> labels; //holds labels to be used
47 string label, calc, groups, outputDir, sharedfile, designfile;
48 vector<string> Estimators, Groups, outputNames, Sets;
50 int process(GroupMap&, string);
51 vector<string> createGroupFile(vector<string>&);
52 int subsampleLookup(vector<SharedRAbundVector*>&, string);