]> git.donarmstrong.com Git - mothur.git/blob - getmetacommunitycommand.h
added Jensen-Shannon calc. working on get.communitytype command. fixed bug in get...
[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
59 /**************************************************************************************************/
60
61 class GetMetaCommunityCommand : public Command {
62 public:
63     GetMetaCommunityCommand(string);
64     GetMetaCommunityCommand();
65     ~GetMetaCommunityCommand(){}
66     
67     vector<string> setParameters();
68     string getCommandName()                     { return "get.communitytype";           }
69     string getCommandCategory()         { return "OTU-Based Approaches";         }
70     
71     string getOutputPattern(string);
72     
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"; }
76     
77     int execute();
78     void help() { m->mothurOut(getHelpString()); }
79     
80 private:
81     struct linePair {
82                 unsigned long long start;
83                 unsigned long long end;
84                 linePair(unsigned long long i, unsigned long long j) : start(i), end(j) {}
85         };
86     bool abort, allLines, subsample;
87     string outputDir;
88     vector<string> outputNames;
89     string sharedfile, method, calc;
90     int minpartitions, maxpartitions, optimizegap, processors, iters, subsampleSize;
91     vector<string> Groups, Estimators;
92     set<string> labels;
93     
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>);
100
101 };
102
103 /**************************************************************************************************/
104 struct summaryData {
105     
106     string name;
107     double refMean, difference;
108     vector<double> partMean, partLCI, partUCI;
109     
110 };
111
112 #endif