X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=metastats2.c;fp=metastats2.c;h=b8db243e9f04a05d84e23e2651e62429a4f98387;hb=89f19f9c6ab89c2f6c7c6921a328ae87bce6f8e3;hp=136c0426f1609964322343157c148ff8971cc4dc;hpb=cbb336d5650cfe1f83a398a837794dcfbbbd3756;p=mothur.git diff --git a/metastats2.c b/metastats2.c index 136c042..b8db243 100644 --- a/metastats2.c +++ b/metastats2.c @@ -22,18 +22,23 @@ int metastat_main (char* outputFileName, int numRows, int numCols, double thresh } // Initialize the matrices - size = row*col; -//printf("size = %d\n.", size); - double matrix[row][col]; - double pmatrix[size],pmatrix2[size],permuted[size]; - double storage[row][9]; -//printf("here\n.", size); - for (i=0;i.999999999){ @@ -198,11 +211,14 @@ int metastat_main (char* outputFileName, int numRows, int numCols, double thresh } } else{ - +printf("here before testp\n"); testp(permuted_ttests, permutes, permuted,pmatrix, nc, nr, gvalue,tinitial,pvalues); // Checks to make sure the matrix isn't sparse. - double sparse[row], sparse2[row]; + double * sparse, * sparse2; + sparse = (double *) malloc(size*sizeof(double *)); + sparse2 = (double *) malloc(size*sizeof(double *)); + for(i=0;i.999999999){ @@ -271,8 +287,12 @@ int metastat_main (char* outputFileName, int numRows, int numCols, double thresh } // Calculates the mean of counts (not normalized) - double temp[row][2]; - + double ** temp; + temp = malloc(row*sizeof(double *)); + for (i = 0; i