]> git.donarmstrong.com Git - mothur.git/blobdiff - rarefact.cpp
sffinfo bug with flow grams right index when clipQualRight=0
[mothur.git] / rarefact.cpp
index d8a6b5cc2be05f8022da2c9234a358bb6fa98e8c..0454d9e253473b368af34f35021dabbc4a50ae1b 100644 (file)
@@ -24,7 +24,7 @@ int Rarefact::getCurve(float percentFreq = 0.01, int nIters = 1000){
                if (percentFreq < 1.0) {  increment = numSeqs * percentFreq;  }
                else { increment = percentFreq;  }      
                
-               #if defined (__APPLE__) || (__MACH__) || (linux) || (__linux)
+               #if defined (__APPLE__) || (__MACH__) || (linux) || (__linux) || (__linux__) || (__unix__) || (__unix)
                                if(processors == 1){
                                        driver(rcd, increment, nIters); 
                                }else{
@@ -86,12 +86,12 @@ int Rarefact::driver(RarefactionCurveData* rcd, int increment, int nIters = 1000
                                lookup->set(binNumber, abundance);
                                rank->set(abundance, rank->get(abundance)+1);
 
-                               if((i == 0) || (i+1) % increment == 0){
+                               if((i == 0) || ((i+1) % increment == 0) || (ends.count(i+1) != 0)){
                                        rcd->updateRankData(rank);
                                }
                        }
        
-                       if(numSeqs % increment != 0){
+                       if((numSeqs % increment != 0) || (ends.count(numSeqs) != 0)){
                                rcd->updateRankData(rank);
                        }
 
@@ -114,7 +114,7 @@ int Rarefact::driver(RarefactionCurveData* rcd, int increment, int nIters = 1000
 
 int Rarefact::createProcesses(vector<int>& procIters, RarefactionCurveData* rcd, int increment) {
        try {
-#if defined (__APPLE__) || (__MACH__) || (linux) || (__linux)
+#if defined (__APPLE__) || (__MACH__) || (linux) || (__linux) || (__linux__) || (__unix__) || (__unix)
                int process = 1;
                
                vector<int> processIDS;
@@ -157,7 +157,7 @@ int Rarefact::createProcesses(vector<int>& procIters, RarefactionCurveData* rcd,
                        for(int j=0;j<displays.size();j++){
                                string s = toString(processIDS[i]) + toString(j) + ".rarefact.temp";
                                displays[j]->inputTempFiles(s);
-                               remove(s.c_str());
+                               m->mothurRemove(s);
                        }
                }