]> git.donarmstrong.com Git - mothur.git/blob - getmetacommunitycommand.h
update .gitignore
[mothur.git] / getmetacommunitycommand.h
1 //
2 //  getmetacommunitycommand.h
3 //  Mothur
4 //
5 //  Created by SarahsWork on 4/9/13.
6 //  Copyright (c) 2013 Schloss Lab. All rights reserved.
7 //
8
9 #ifndef Mothur_getmetacommunitycommand_h
10 #define Mothur_getmetacommunitycommand_h
11
12 #include "command.hpp"
13 #include "inputdata.h"
14 #include "qFinderDMM.h"
15 #include "pam.h"
16 #include "sharedsobscollectsummary.h"
17 #include "sharedchao1.h"
18 #include "sharedace.h"
19 #include "sharednseqs.h"
20 #include "sharedjabund.h"
21 #include "sharedsorabund.h"
22 #include "sharedjclass.h"
23 #include "sharedsorclass.h"
24 #include "sharedjest.h"
25 #include "sharedsorest.h"
26 #include "sharedthetayc.h"
27 #include "sharedthetan.h"
28 #include "sharedkstest.h"
29 #include "whittaker.h"
30 #include "sharedochiai.h"
31 #include "sharedanderbergs.h"
32 #include "sharedkulczynski.h"
33 #include "sharedkulczynskicody.h"
34 #include "sharedlennon.h"
35 #include "sharedmorisitahorn.h"
36 #include "sharedbraycurtis.h"
37 #include "sharedjackknife.h"
38 #include "whittaker.h"
39 #include "odum.h"
40 #include "canberra.h"
41 #include "structeuclidean.h"
42 #include "structchord.h"
43 #include "hellinger.h"
44 #include "manhattan.h"
45 #include "structpearson.h"
46 #include "soergel.h"
47 #include "spearman.h"
48 #include "structkulczynski.h"
49 #include "structchi2.h"
50 #include "speciesprofile.h"
51 #include "hamming.h"
52 #include "gower.h"
53 #include "memchi2.h"
54 #include "memchord.h"
55 #include "memeuclidean.h"
56 #include "mempearson.h"
57 #include "sharedjsd.h"
58 #include "sharedrjsd.h"
59
60 /**************************************************************************************************/
61
62 class GetMetaCommunityCommand : public Command {
63 public:
64     GetMetaCommunityCommand(string);
65     GetMetaCommunityCommand();
66     ~GetMetaCommunityCommand(){}
67     
68     vector<string> setParameters();
69     string getCommandName()                     { return "get.communitytype";           }
70     string getCommandCategory()         { return "OTU-Based Approaches";         }
71     
72     string getOutputPattern(string);
73     
74         string getHelpString();
75     string getCitation() { return "Holmes I, Harris K, Quince C (2012) Dirichlet Multinomial Mixtures: Generative Models for Microbial Metagenomics. PLoS ONE 7(2): e30126. doi:10.1371/journal.pone.0030126 http://www.mothur.org/wiki/get.communitytype"; }
76     string getDescription()             { return "Assigns samples to bins using a Dirichlet multinomial mixture model"; }
77     
78     int execute();
79     void help() { m->mothurOut(getHelpString()); }
80     
81 private:
82     struct linePair {
83                 unsigned long long start;
84                 unsigned long long end;
85                 linePair(unsigned long long i, unsigned long long j) : start(i), end(j) {}
86         };
87     bool abort, allLines, subsample;
88     string outputDir;
89     vector<string> outputNames;
90     string sharedfile, method, calc;
91     int minpartitions, maxpartitions, optimizegap, processors, iters, subsampleSize;
92     vector<string> Groups, Estimators;
93     set<string> labels;
94     
95     vector<vector<double> > generateDistanceMatrix(vector<SharedRAbundVector*>& lookup);
96     int driver(vector<SharedRAbundVector*> thisLookup, vector< vector<seqDist> >& calcDists, Calculator*);
97     int processDriver(vector<SharedRAbundVector*>&, vector<int>&, string, vector<string>, vector<string>, vector<string>, int);
98     int createProcesses(vector<SharedRAbundVector*>&);
99     vector<double> generateDesignFile(int, map<string,string>);
100     int generateSummaryFile(int, map<string,string>, vector<double>);
101
102 };
103
104 /**************************************************************************************************/
105 struct summaryData {
106     
107     string name;
108     double refMean, difference;
109     vector<double> partMean, partLCI, partUCI;
110     
111 };
112
113 #endif