X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=rarefact.cpp;h=0454d9e253473b368af34f35021dabbc4a50ae1b;hb=6b32d112bb60e9f7eb6d4407a4eed4c49b67bced;hp=ca105b7f82fad6be8cc45e7b9e7953da3f4471e4;hpb=19fcbbdba99658f5eca244803280f9ee7f9f6607;p=mothur.git diff --git a/rarefact.cpp b/rarefact.cpp index ca105b7..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;