]> git.donarmstrong.com Git - mothur.git/blob - phylodiversitycommand.h
sffinfo bug with flow grams right index when clipQualRight=0
[mothur.git] / phylodiversitycommand.h
1 #ifndef PHYLODIVERSITYCOMMAND_H
2 #define PHYLODIVERSITYCOMMAND_H
3
4 /*
5  *  phylodiversitycommand.h
6  *  Mothur
7  *
8  *  Created by westcott on 4/30/10.
9  *  Copyright 2010 Schloss Lab. All rights reserved.
10  *
11  */
12
13 #include "command.hpp"
14 #include "counttable.h"
15 #include "sharedutilities.h"
16 #include "tree.h"
17
18 class PhyloDiversityCommand : public Command {
19         
20         public:
21                 PhyloDiversityCommand(string);
22                 PhyloDiversityCommand();
23                 ~PhyloDiversityCommand(){}
24         
25                 vector<string> setParameters();
26                 string getCommandName()                 { return "phylo.diversity";                     }
27                 string getCommandCategory()             { return "Hypothesis Testing";          }
28                 
29         string getHelpString(); 
30     string getOutputPattern(string);    
31                 string getCitation() { return "Faith DP (1994). Phylogenetic pattern and the quantification of organismal biodiversity. Philos Trans R Soc Lond B Biol Sci 345: 45-58. \nhttp://www.mothur.org/wiki/Phylo.diversity"; }
32                 string getDescription()         { return "phylo.diversity"; }
33
34                 int execute();
35                 void help() { m->mothurOut(getHelpString()); }
36 private:
37                 CountTable* ct;
38                 float freq;
39                 int iters, processors, numUniquesInName;  
40                 bool abort, rarefy, summary, collect, scale;
41                 string groups, outputDir, treefile, groupfile, namefile, countfile;
42                 vector<string> Groups, outputNames; //holds groups to be used, and outputFile names
43                 
44         map<string, int> getRootForGroups(Tree* t);
45                 int readNamesFile();
46                 void printData(set<int>&, map< string, vector<float> >&, ofstream&, int);
47                 void printSumData(map< string, vector<float> >&, ofstream&, int);
48         vector<float> calcBranchLength(Tree*, int, vector< map<string, bool> >&, map<string, int>);
49                 int driver(Tree*, map< string, vector<float> >&, map<string, vector<float> >&, int, int, vector<int>&, set<int>&, ofstream&, ofstream&, bool);
50                 int createProcesses(vector<int>&, Tree*, map< string, vector<float> >&, map<string, vector<float> >&, int, int, vector<int>&, set<int>&, ofstream&, ofstream&);
51
52 };
53
54 #endif
55