2 // getmetacommunitycommand.h
5 // Created by SarahsWork on 4/9/13.
6 // Copyright (c) 2013 Schloss Lab. All rights reserved.
9 #ifndef Mothur_getmetacommunitycommand_h
10 #define Mothur_getmetacommunitycommand_h
12 #include "command.hpp"
13 #include "inputdata.h"
14 #include "qFinderDMM.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"
41 #include "structeuclidean.h"
42 #include "structchord.h"
43 #include "hellinger.h"
44 #include "manhattan.h"
45 #include "structpearson.h"
48 #include "structkulczynski.h"
49 #include "structchi2.h"
50 #include "speciesprofile.h"
55 #include "memeuclidean.h"
56 #include "mempearson.h"
57 #include "sharedjsd.h"
58 #include "sharedrjsd.h"
60 /**************************************************************************************************/
62 class GetMetaCommunityCommand : public Command {
64 GetMetaCommunityCommand(string);
65 GetMetaCommunityCommand();
66 ~GetMetaCommunityCommand(){}
68 vector<string> setParameters();
69 string getCommandName() { return "get.communitytype"; }
70 string getCommandCategory() { return "OTU-Based Approaches"; }
72 string getOutputPattern(string);
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"; }
79 void help() { m->mothurOut(getHelpString()); }
83 unsigned long long start;
84 unsigned long long end;
85 linePair(unsigned long long i, unsigned long long j) : start(i), end(j) {}
87 bool abort, allLines, subsample;
89 vector<string> outputNames;
90 string sharedfile, method, calc;
91 int minpartitions, maxpartitions, optimizegap, processors, iters, subsampleSize;
92 vector<string> Groups, Estimators;
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>);
104 /**************************************************************************************************/
108 double refMean, difference;
109 vector<double> partMean, partLCI, partUCI;