]> git.donarmstrong.com Git - mothur.git/commitdiff
metastats double* to double fix for windows
authorwestcott <westcott>
Wed, 8 Dec 2010 21:51:24 +0000 (21:51 +0000)
committerwestcott <westcott>
Wed, 8 Dec 2010 21:51:24 +0000 (21:51 +0000)
makefile
metastats2.c
mothur
removegroupscommand.cpp

index 36d0d77c04db4a4fe023cb6fdda4acd5869ad4d1..aa20f8ca67d6594234f9de806556770fa79576ee 100644 (file)
--- a/makefile
+++ b/makefile
@@ -30,8 +30,8 @@ endif
 
 MOTHUR_FILES = "\"../release\""
 
-RELEASE_DATE = "\"11/02/2010\""
-VERSION = "\"1.14.0\""
+RELEASE_DATE = "\"12/10/2010\""
+VERSION = "\"1.15.0\""
 
 CXXFLAGS += -DRELEASE_DATE=${RELEASE_DATE} -DVERSION=${VERSION}
 
index a6424f5fa95086083d4c09658f7c9e2338d2381c..8f5ce39eb9d5523e10dee238abbf65ed8530cbbb 100644 (file)
@@ -34,8 +34,8 @@ int metastat_main (char* outputFileName, int numRows, int numCols, double thresh
                storage[i] = malloc(9*sizeof(double));
        }
        
-       pmatrix = (double *) malloc(size*sizeof(double *));
-       permuted = (double *) malloc(size*sizeof(double *));
+       pmatrix = (double *) malloc(size*sizeof(double));
+       permuted = (double *) malloc(size*sizeof(double));
        
                
        
@@ -133,9 +133,9 @@ int metastat_main (char* outputFileName, int numRows, int numCols, double thresh
 
   //changing ptt_size to row
   double * permuted_ttests, * pvalues, * tinitial;
-  permuted_ttests = (double *) malloc(size*sizeof(double *));
-  pvalues = (double *) malloc(size*sizeof(double *));
-  tinitial = (double *) malloc(size*sizeof(double *));
+  permuted_ttests = (double *) malloc(size*sizeof(double));
+  pvalues = (double *) malloc(size*sizeof(double));
+  tinitial = (double *) malloc(size*sizeof(double));
   
   for(i=0;i<row;i++){
     permuted_ttests[i]=0;}
@@ -153,8 +153,8 @@ int metastat_main (char* outputFileName, int numRows, int numCols, double thresh
   if ( (col==2) || ((g-1)<8) || ((col-g+1) < 8) ){  
 
   double * fish, *fish2;
-  fish = (double *) malloc(size*sizeof(double *));
-  fish2 = (double *) malloc(size*sizeof(double *));
+  fish = (double *) malloc(size*sizeof(double));
+  fish2 = (double *) malloc(size*sizeof(double));
          
   for(i=0;i<row;i++){
        fish[i]=0;
@@ -190,8 +190,8 @@ int metastat_main (char* outputFileName, int numRows, int numCols, double thresh
        double *expect, *prc, *emin,*prt,*pre;
        double e=0, prc1=0, emin1=0, prt1=0, pre1=0;
          
-       prt = (double *) malloc(size*sizeof(double *));
-       prc = (double *) malloc(size*sizeof(double *));
+       prt = (double *) malloc(size*sizeof(double));
+       prc = (double *) malloc(size*sizeof(double));
 
        nr = &nrow;
        nc = &ncol;
@@ -214,13 +214,13 @@ 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, * sparse2;
-  sparse = (double *) malloc(size*sizeof(double *));
-  sparse2 = (double *) malloc(size*sizeof(double *));
+  sparse = (double *) malloc(size*sizeof(double));
+  sparse2 = (double *) malloc(size*sizeof(double));
          
   for(i=0;i<row;i++){
        sparse[i]=0;
@@ -275,7 +275,7 @@ printf("here before testp\n");
        emin=&emin1;
        prt=&prt1;
        pre=&pre1;
-printf("here before fexact2\n");               
+       
        fexact(nr,nc,data, ldtabl,expect,prc,emin,prt,pre,work);
        
        if (*pre>.999999999){
@@ -295,7 +295,7 @@ printf("here before fexact2\n");
   for (i = 0; i<row; i++){
         temp[i] = malloc(col*sizeof(double));
   }
-printf("here\n");        
+         
   for(j=0;j<row;j++){
        for(i=0;i<2;i++){
                temp[j][i]=0;
@@ -558,8 +558,7 @@ void start(double *Imatrix,int *g,int *nr,int *nc,double *initial,
     C1[i][1]=tool[i+*nr+*nr]; // var group 1
     storage[i][1]=C1[i][1];
     C1[i][2]=C1[i][1]/(gvalue-1);
-    storage[i][2]=sqrt(C1[i][2]);
-    printf("here2\n"); 
+    storage[i][2]=sqrt(C1[i][2]); 
     C2[i][0]=tool[i+*nr]; // mean group 2
     storage[i][4]=C2[i][0]; 
     C2[i][1]=tool[i+*nr+*nr+*nr]; // var group 2 
diff --git a/mothur b/mothur
index 3b721adfb6d23378be97bdbf2e494d296d3406ff..8537592bedac973680d95c8f689e79510f434a66 100755 (executable)
Binary files a/mothur and b/mothur differ
index 93646bcf8ad225a3db162dc2cb582cf2f164e481..6042bbecebf848b7a37d158293dc7650d2587c51 100644 (file)
@@ -420,6 +420,7 @@ int RemoveGroupsCommand::readName(){
                                }
                        }
                        
+                       
                        //if the name in the first column is in the set then print it and any other names in second column also in set
                        if (names.count(firstCol) == 0) {