]> git.donarmstrong.com Git - mothur.git/blob - summarycommand.h
added load.logfile command. changed summary.single output for subsample=t.
[mothur.git] / summarycommand.h
1 #ifndef SUMMARYCOMMAND_H
2 #define SUMMARYCOMMAND_H
3 /*
4  *  summarycommand.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 "sabundvector.hpp"
14 #include "inputdata.h"
15 #include "calculator.h"
16 #include "validcalculator.h"
17
18 class SummaryCommand : public Command {
19
20 public:
21         SummaryCommand(string);
22         SummaryCommand();
23         ~SummaryCommand(){}
24         
25         vector<string> setParameters();
26         string getCommandName()                 { return "summary.single";                      }
27         string getCommandCategory()             { return "OTU-Based Approaches";        }
28         string getOutputFileNameTag(string, string);
29         string getHelpString(); 
30         string getCitation() { return "http://www.mothur.org/wiki/Summary.single"; }
31         string getDescription()         { return "generate summary file that has the calculator value for each line in the OTU data"; }
32
33         
34         int execute(); 
35         void help() { m->mothurOut(getHelpString()); }  
36         
37 private:
38         vector<Calculator*> sumCalculators;     
39         InputData* input;
40         SAbundVector* sabund;
41         int abund, size, iters, subsampleSize;
42
43         bool abort, allLines, groupMode, subsample;
44         set<string> labels; //holds labels to be used
45         string label, calc, outputDir, sharedfile, listfile, rabundfile, sabundfile, format, inputfile;
46         vector<string>  Estimators;
47         vector<string> inputFileNames, outputNames;
48         vector<string> groups;
49         
50         vector<string> parseSharedFile(string);
51         vector<string> createGroupSummaryFile(int, int, vector<string>&, map<string, string>);
52     int process(SAbundVector*&, ofstream&, ofstream&);
53
54
55 };
56 #endif