X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=rarefact.cpp;h=0454d9e253473b368af34f35021dabbc4a50ae1b;hb=bd27c2b0612942815b7417c79f7ee41f669a2a34;hp=032cd93752db10521d18495aa141888e37720963;hpb=5694c92fbf646fe01abc87bde2af59e14a9a56b6;p=mothur.git diff --git a/rarefact.cpp b/rarefact.cpp index 032cd93..0454d9e 100644 --- a/rarefact.cpp +++ b/rarefact.cpp @@ -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& 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 processIDS; @@ -157,7 +157,7 @@ int Rarefact::createProcesses(vector& procIters, RarefactionCurveData* rcd, for(int j=0;jinputTempFiles(s); - remove(s.c_str()); + m->mothurRemove(s); } } @@ -183,7 +183,7 @@ try { } //if jumble is false all iters will be the same - if (globaldata->jumble == false) { nIters = 1; } + if (m->jumble == false) { nIters = 1; } //convert freq percentage to number int increment = 1; @@ -196,7 +196,7 @@ try { displays[i]->init(label); } - if (globaldata->jumble == true) { + if (m->jumble == true) { //randomize the groups random_shuffle(lookup.begin(), lookup.end()); }