X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=distancecommand.h;h=af55406b372dbf0f56a546be4de2bc87f5072614;hp=f55f7144fa548fe30eae2b075a8abcf8fd4584f0;hb=1a20e24ee786195ab0e1cccd4f5aede7a88f3f4e;hpb=e0dc0bcef2a0f7e1f63abb531dbb1ad533da98ca diff --git a/distancecommand.h b/distancecommand.h index f55f714..af55406 100644 --- a/distancecommand.h +++ b/distancecommand.h @@ -33,7 +33,7 @@ struct distanceData { vector Estimators; MothurOut* m; string output; - int numNewFasta; + int numNewFasta, count; string countends; distanceData(){} @@ -53,7 +53,7 @@ struct distanceData { }; /**************************************************************************************************/ -#if defined (__APPLE__) || (__MACH__) || (linux) || (__linux) +#if defined (__APPLE__) || (__MACH__) || (linux) || (__linux) || (__linux__) || (__unix__) || (__unix) #else static DWORD WINAPI MyDistThreadFunction(LPVOID lpParam){ distanceData* pDataArray; @@ -86,7 +86,7 @@ static DWORD WINAPI MyDistThreadFunction(LPVOID lpParam){ ofstream outFile(pDataArray->dFileName.c_str(), ios::trunc); outFile.setf(ios::fixed, ios::showpoint); outFile << setprecision(4); - + pDataArray->count = 0; if (pDataArray->output != "square") { if((pDataArray->output == "lt") && (pDataArray->startLine == 0)){ outFile << pDataArray->alignDB.getNumSeqs() << endl; } @@ -121,9 +121,9 @@ static DWORD WINAPI MyDistThreadFunction(LPVOID lpParam){ if(i % 100 == 0){ pDataArray->m->mothurOut(toString(i) + "\t" + toString(time(NULL) - startTime)); pDataArray->m->mothurOutEndLine(); } - + pDataArray->count++; } - pDataArray->m->mothurOut(toString(pDataArray->endLine-1) + "\t" + toString(time(NULL) - startTime)); pDataArray->m->mothurOutEndLine(); + pDataArray->m->mothurOut(toString(pDataArray->count) + "\t" + toString(time(NULL) - startTime)); pDataArray->m->mothurOutEndLine(); }else{ if(pDataArray->startLine == 0){ outFile << pDataArray->alignDB.getNumSeqs() << endl; } @@ -150,9 +150,9 @@ static DWORD WINAPI MyDistThreadFunction(LPVOID lpParam){ if(i % 100 == 0){ pDataArray->m->mothurOut(toString(i) + "\t" + toString(time(NULL) - startTime)); pDataArray->m->mothurOutEndLine(); } - + pDataArray->count++; } - pDataArray->m->mothurOut(toString(pDataArray->endLine-1) + "\t" + toString(time(NULL) - startTime)); pDataArray->m->mothurOutEndLine(); + pDataArray->m->mothurOut(toString(pDataArray->count) + "\t" + toString(time(NULL) - startTime)); pDataArray->m->mothurOutEndLine(); } outFile.close(); @@ -178,7 +178,9 @@ public: vector setParameters(); string getCommandName() { return "dist.seqs"; } string getCommandCategory() { return "Sequence Processing"; } + string getHelpString(); + string getOutputPattern(string); string getCitation() { return "Schloss PD (2010). The effects of alignment quality, distance calculation method, sequence filtering, and region on the analysis of 16S rRNA gene-based studies. PLoS Comput Biol 6: e1000844. \nhttp://www.mothur.org/wiki/Dist.seqs"; } string getDescription() { return "calculate the pairwaise distances between aligned sequences"; }