int metastat_main (char* outputFileName, int numRows, int numCols, double threshold, int numPermutations, double** data, int secondGroupingStart){
- int size,c=0,i=0,j=0,k,counter=0, bflag=0;
+ int size,c=0,i=0,j=0,counter=0, bflag=0;
int B=numPermutations;
int row = numRows;
int col = numCols;
int g = secondGroupingStart;
double thresh=threshold;
- double placeholder=0,min=0;
+ double min=0;
char output[1024];
strcpy(output, outputFileName);
// Initialize the matrices
size = row*col;
double matrix[row][col];
- double pmatrix[size],pmatrix2[size],permuted[size];
+ double pmatrix[size],permuted[size];
double storage[row][9];
for (i=0;i<row;i++){
ratio[i]=total[i]/min;
}
- // Change matrix into an array as received by R for compatibility.
+ //Change matrix into an array as received by R for compatibility.
c=0;
for(i=0;i<col;i++){
prt=&prt1;
pre=&pre1;
+ //MothurFisher fishtere;
+ //double mothurFex = fishtere.fexact(f11, f12, f21, f22);
+
fexact(nr,nc,data, ldtabl,expect,prc,emin,prt,pre,work);
if (*pre>.999999999){
*pre=1;
}
+
+ //printf("feaxt = %f\t%f\t%f\t%f\t%f\t%f\n", *expect, *pre, f11, f12, f21, f22);
storage[i][8] = *pre;
pvalues[i]=*pre;
}
*ps) {
double Tvalues[*nr];
- int a, b, n, i, j,k=0;
+ int a, b, n, j;
a = *B;
b = *nr;