X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=shhhseqscommand.h;h=ffd72b9ebdc161291f9705333f018cb56c09559c;hp=5aceca8888e959c4ac4e511b15f954e7564c40c5;hb=615301e57c25e241356a9c2380648d117709458d;hpb=e0dc0bcef2a0f7e1f63abb531dbb1ad533da98ca diff --git a/shhhseqscommand.h b/shhhseqscommand.h index 5aceca8..ffd72b9 100644 --- a/shhhseqscommand.h +++ b/shhhseqscommand.h @@ -29,8 +29,10 @@ public: vector setParameters(); string getCommandName() { return "shhh.seqs"; } string getCommandCategory() { return "Sequence Processing"; } + string getHelpString(); - string getCitation() { return "http://www.mothur.org/wiki/Shhh.seqs"; } + string getOutputPattern(string); + string getCitation() { return "Schloss PD, Gevers D, Westcott SL (2011). Reducing the effects of PCR amplification and sequencing artifacts on 16S rRNA-based studies. PLoS ONE. 6:e27310.\nQuince C, Lanzen A, Davenport RJ, Turnbaugh PJ (2011). Removing noise from pyrosequenced amplicons. BMC Bioinformatics 12:38.\nhttp://www.mothur.org/wiki/Shhh.seqs"; } string getDescription() { return "shhh.seqs"; } @@ -55,8 +57,8 @@ private: int loadData(correctDist*, seqNoise&, vector&, vector&, vector&, vector&, map&, vector&); int driver(seqNoise&, vector&, vector&, vector&, vector&, string, string, string, string); - int driverGroups(SequenceParser&, string, string, string, int, int, vector); - int createProcessesGroups(SequenceParser&, string, string, string, vector); + vector driverGroups(SequenceParser&, string, string, string, int, int, vector); + vector createProcessesGroups(SequenceParser&, string, string, string, vector); int deconvoluteResults(string, string); @@ -75,8 +77,9 @@ struct shhhseqsData { MothurOut* m; int start; int end; - int sigma, threadID; + int sigma, threadID, count; vector groups; + vector mapfileNames; shhhseqsData(){} shhhseqsData(string f, string n, string g, string nff, string nnf, string nmf, vector gr, MothurOut* mout, int st, int en, int s, int tid) { @@ -85,18 +88,19 @@ struct shhhseqsData { groupfile = g; newFName = nff; newNName = nnf; - newNName = nmf; + newMName = nmf; m = mout; start = st; end = en; sigma = s; threadID = tid; groups = gr; + count=0; } }; /**************************************************************************************************/ -#if defined (__APPLE__) || (__MACH__) || (linux) || (__linux) +#if defined (__APPLE__) || (__MACH__) || (linux) || (__linux) || (__linux__) || (__unix__) || (__unix) #else static DWORD WINAPI MyShhhSeqsThreadFunction(LPVOID lpParam){ shhhseqsData* pDataArray; @@ -110,12 +114,14 @@ static DWORD WINAPI MyShhhSeqsThreadFunction(LPVOID lpParam){ //precluster each group for (int k = pDataArray->start; k < pDataArray->end; k++) { + pDataArray->count++; + int start = time(NULL); if (pDataArray->m->control_pressed) { return 0; } pDataArray->m->mothurOutEndLine(); pDataArray->m->mothurOut("Processing group " + pDataArray->groups[k] + ":"); pDataArray->m->mothurOutEndLine(); - + map thisNameMap; thisNameMap = parser.getNameMap(pDataArray->groups[k]); vector thisSeqs = parser.getSeqs(pDataArray->groups[k]); @@ -311,10 +317,9 @@ static DWORD WINAPI MyShhhSeqsThreadFunction(LPVOID lpParam){ pDataArray->m->appendFiles(pDataArray->newFName+pDataArray->groups[k], pDataArray->newFName); pDataArray->m->mothurRemove(pDataArray->newFName+pDataArray->groups[k]); pDataArray->m->appendFiles(pDataArray->newNName+pDataArray->groups[k], pDataArray->newNName); pDataArray->m->mothurRemove(pDataArray->newNName+pDataArray->groups[k]); + pDataArray->mapfileNames.push_back(pDataArray->newMName+pDataArray->groups[k]+".map"); pDataArray->m->mothurOut("It took " + toString(time(NULL) - start) + " secs to process group " + pDataArray->groups[k] + "."); pDataArray->m->mothurOutEndLine(); - - } return 0; @@ -322,7 +327,7 @@ static DWORD WINAPI MyShhhSeqsThreadFunction(LPVOID lpParam){ } catch(exception& e) { - pDataArray->m->errorOut(e, "PreClusterCommand", "MyPreclusterThreadFunction"); + pDataArray->m->errorOut(e, "ShhhSeqsCommand", "MyShhhSeqsThreadFunction"); exit(1); } }