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"
59 /**************************************************************************************************/
61 class GetMetaCommunityCommand : public Command {
63 GetMetaCommunityCommand(string);
64 GetMetaCommunityCommand();
65 ~GetMetaCommunityCommand(){}
67 vector<string> setParameters();
68 string getCommandName() { return "get.communitytype"; }
69 string getCommandCategory() { return "OTU-Based Approaches"; }
71 string getOutputPattern(string);
73 string getHelpString();
74 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"; }
75 string getDescription() { return "Assigns samples to bins using a Dirichlet multinomial mixture model"; }
78 void help() { m->mothurOut(getHelpString()); }
82 unsigned long long start;
83 unsigned long long end;
84 linePair(unsigned long long i, unsigned long long j) : start(i), end(j) {}
86 bool abort, allLines, subsample;
88 vector<string> outputNames;
89 string sharedfile, method, calc;
90 int minpartitions, maxpartitions, optimizegap, processors, iters, subsampleSize;
91 vector<string> Groups, Estimators;
94 vector<vector<double> > generateDistanceMatrix(vector<SharedRAbundVector*>& lookup);
95 int driver(vector<SharedRAbundVector*> thisLookup, vector< vector<seqDist> >& calcDists, Calculator*);
96 int processDriver(vector<SharedRAbundVector*>&, vector<int>&, string, vector<string>, vector<string>, vector<string>, int);
97 int createProcesses(vector<SharedRAbundVector*>&);
98 vector<double> generateDesignFile(int, map<string,string>);
99 int generateSummaryFile(int, map<string,string>, vector<double>);
103 /**************************************************************************************************/
107 double refMean, difference;
108 vector<double> partMean, partLCI, partUCI;