File: collectcommand.h

package info (click to toggle)
mothur 1.48.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 13,684 kB
  • sloc: cpp: 161,854; makefile: 122; sh: 31
file content (67 lines) | stat: -rwxr-xr-x 2,343 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#ifndef COLLECTCOMMAND_H
#define COLLECTCOMMAND_H
/*
 *  collectcommand.h
 *  Dotur
 *
 *  Created by Sarah Westcott on 1/2/09.
 *  Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved.
 *
 */

#include "command.hpp"
#include "ordervector.hpp"
#include "inputdata.h"
#include "collect.h"
#include "validcalculator.h"

/*The collect() command:
	The collect command generates a collector's curve from the given file.  
	The collect command outputs a file for each estimator you choose to use.  The collect command parameters are label, freq, single, abund.  
	No parameters are required.  
	The collect command should be in the following format: collect(label=yourLabel, freq=yourFreq, single=yourEstimators, abund=yourAbund). 
	example collect(label=unique-.01-.03, freq=10, single=collect-chao-ace-jack).  
	The default values for  freq is 100, for abund is 10, and single are collect-chao-ace-jack-bootstrap-shannon-npshannon-simpson.  
	The valid single estimators are: collect-chao-ace-jack-bootstrap-shannon-npshannon-simpson. 
	The label parameter is used to analyze specific labels in your input. */


class CollectCommand : public Command {
	
public:
	CollectCommand(string);	
	~CollectCommand(){}
	
	vector<string> setParameters();
	string getCommandName()			{ return "collect.single";			}
	string getCommandCategory()		{ return "OTU-Based Approaches";	}
	string getCitation() { return "Schloss PD, Handelsman J (2006). Introducing SONS, A tool that compares the membership of microbial communities. Appl Environ Microbiol 72: 6773-9. \nhttp://www.mothur.org/wiki/Collect.single"; }
	
	string getHelpString();	
    string getOutputPattern(string);	
	string getDescription()		{ return "generates collector's curves using calculators, that describe the richness, diversity, and other features of individual samples"; }
	
	int execute(); 
	void help() { m->mothurOut(getHelpString()); }	
	
	
private:
	vector<Display*> cDisplays;
	int abund, size, alpha;
	float freq;
	vector<string> outputNames, groups;

	bool abort, allLines;
	set<string> labels; //holds labels to be used
	string label, calc, sharedfile, listfile, rabundfile, sabundfile, format, inputfile;
	vector<string>  Estimators;
	vector<string> inputFileNames;
    
	
	vector<string> parseSharedFile(string);
    void fillCDisplays(map<string, string>);


};

#endif