]> git.donarmstrong.com Git - mothur.git/blobdiff - metastats2.c
fixing helps
[mothur.git] / metastats2.c
index 3b801a0b110c5685fcc3a62f66ab3ad516a862d2..bbea3ce8deacf3debe2b6f5adfc909e944862345 100644 (file)
@@ -1,6 +1,8 @@
 
 #include "metastats.h"
 
+//The following code has been modified using the original Metastats program from White, J.R., Nagarajan, N. & Pop, M. Statistical methods for detecting differentially abundant features in clinical metagenomic samples. PLoS Comput Biol 5, e1000352 (2009).
+
 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; 
@@ -407,11 +409,11 @@ void permute_array(int *array, int n) {
   
   if (! seeded) {
     seeded = 1;
-    srandom(time(NULL));
+    srand(time(NULL));
   }
   
   for (i = 0; i < n; i++) {
-    int selection = random() % (n - i);
+    int selection = rand() % (n - i);
     int tmp = array[i + selection];
     array[i + selection] = array[i];
     array[i] = tmp;