]> git.donarmstrong.com Git - mothur.git/blob - mothurmetastats.h
rewrote metastats command in c++, added mothurRemove function to handle ~ error....
[mothur.git] / mothurmetastats.h
1 #ifndef MOTHUR_METASTATS
2 #define MOTHUR_METASTATS
3
4 /*
5  *  mothurmetastats.h
6  *  Mothur
7  *
8  *  Created by westcott on 7/6/11.
9  *  Copyright 2011 Schloss Lab. All rights reserved.
10  *
11  */
12
13
14 #include "mothurout.h"
15
16 class MothurMetastats {
17         
18         public:
19                 MothurMetastats(double, int); //threshold, numPermutations
20                 ~MothurMetastats();
21         
22                 int runMetastats(string, vector< vector<double> >&, int); //outputFileName, data, secondGroupingStart
23         
24         private:
25                 MothurOut* m;
26                 int row, column, numPermutations;
27                 double threshold;
28         
29                 int start(vector<double>&, int, vector<double>&, vector< vector<double> >&); //Find the initial values for the matrix
30                 int meanvar(vector<double>&, int, vector<double>&);
31                 int testp(vector<double>&, vector<double>&, vector<double>&, int, vector<double>&, vector<double>&);
32                 int permute_matrix(vector<double>&, vector<double>&, int, vector<double>&, vector<double>&, vector<double>&);
33                 int permute_array(vector<int>&);
34                 int calc_twosample_ts(vector<double>&, int, vector<double>&, vector<double>&, vector<double>&);
35
36
37
38         
39 };
40         
41         //void testp(double *permuted_ttests,int *B,double *permuted,double 
42                 //         *Imatrix,int *nc,int *nr,int *g,double *Tinitial,double *ps);
43         //void permute_matrix(double *Imatrix,int *nc,int *nr,double 
44                                         //      *permuted,int *g,double *trial_ts,double *Tinitial,double 
45                                         //      *counter);
46         //void permute_array(int *array, int n);
47         //void calc_twosample_ts(double *Pmatrix,int *g,int *nc,int *nr,double 
48         //                                         *Ts,double *Tinitial,double *counter1);
49         //void meanvar(double *pmatrix,int *g,int *nr,int *nc,double *storage);
50         //void start(double *Imatrix,int *g,int *nr,int *nc,double *testing,
51         //                 double storage[][9]);
52         
53         //int metastat_main (char*, int, int, double, int, double**, int);
54         
55
56 #endif
57