X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=chimeraslayercommand.h;h=ee43bcbf72a2ca00af3e2270768f34ac1357bb71;hb=14cddf859d97118481161bf3e85a647976020758;hp=a2e22ae527d465b475a4f89b5fa606198315c3a4;hpb=49d2b7459c5027557564b21e9487dadafbbbdc96;p=mothur.git diff --git a/chimeraslayercommand.h b/chimeraslayercommand.h index a2e22ae..ee43bcb 100644 --- a/chimeraslayercommand.h +++ b/chimeraslayercommand.h @@ -15,6 +15,7 @@ #include "chimera.h" #include "chimeraslayer.h" #include "sequenceparser.h" +#include "sequencecountparser.h" /***********************************************************/ @@ -27,9 +28,10 @@ public: vector setParameters(); string getCommandName() { return "chimera.slayer"; } string getCommandCategory() { return "Sequence Processing"; } - string getOutputFileNameTag(string, string); + string getHelpString(); - string getCitation() { return "Haas BJ, Gevers D, Earl A, Feldgarden M, Ward DV, Giannokous G, Ciulla D, Tabbaa D, Highlander SK, Sodergren E, Methe B, Desantis TZ, Petrosino JF, Knight R, Birren BW (2011). Chimeric 16S rRNA sequence formation and detection in Sanger and 454-pyrosequenced PCR amplicons. Genome Res. \nhttp://www.mothur.org/wiki/Chimera.slayer"; } + string getOutputPattern(string); + string getCitation() { return "Haas BJ, Gevers D, Earl A, Feldgarden M, Ward DV, Giannokous G, Ciulla D, Tabbaa D, Highlander SK, Sodergren E, Methe B, Desantis TZ, Petrosino JF, Knight R, Birren BW (2011). Chimeric 16S rRNA sequence formation and detection in Sanger and 454-pyrosequenced PCR amplicons. Genome Res 21:494.\nhttp://www.mothur.org/wiki/Chimera.slayer"; } string getDescription() { return "detect chimeric sequences"; } int execute(); @@ -51,12 +53,14 @@ private: int divideInHalf(Sequence, string&, string&); map sortFastaFile(string, string); map sortFastaFile(vector&, map&, string newFile); + int sortFastaFile(vector&, map&, string newFile); string getNamesFile(string&); //int setupChimera(string,); int MPIExecute(string, string, string, string, map&); - int deconvoluteResults(SequenceParser*, string, string, string); + int deconvoluteResults(map&, string, string, string); map priority; int setUpForSelfReference(SequenceParser*&, map&, map >&, int); + int setUpForSelfReference(SequenceCountParser*&, map&, map >&, int); int driverGroups(string, string, string, map >&, map&); int createProcessesGroups(string, string, string, map >&, map&); int MPIExecuteGroups(string, string, string, map >&, map&); @@ -66,8 +70,8 @@ private: int driverMPI(int, int, MPI_File&, MPI_File&, MPI_File&, MPI_File&, vector&, string, map&, bool); #endif - bool abort, realign, trim, trimera, save; - string fastafile, groupfile, templatefile, outputDir, search, namefile, blastlocation; + bool abort, realign, trim, trimera, save, hasName, hasCount, dups; + string fastafile, groupfile, templatefile, outputDir, search, namefile, countfile, blastlocation; int processors, window, iters, increment, numwanted, ksize, match, mismatch, parents, minSimilarity, minCoverage, minBS, minSNP, numSeqs, templateSeqsLength; float divR; @@ -209,8 +213,6 @@ static DWORD WINAPI MySlayerThreadFunction(LPVOID lpParam){ inFASTA.seekg(pDataArray->start-1); pDataArray->m->gobble(inFASTA); } - pDataArray->count = pDataArray->end; - if (pDataArray->m->control_pressed) { out.close(); out2.close(); if (pDataArray->trim) { out3.close(); } inFASTA.close(); delete chimera; return 0; } if (chimera->getUnaligned()) { @@ -223,7 +225,7 @@ static DWORD WINAPI MySlayerThreadFunction(LPVOID lpParam){ if (pDataArray->start == 0) { chimera->printHeader(out); } - int count = 0; + pDataArray->count = 0; for(int i = 0; i < pDataArray->end; i++){ if (pDataArray->m->control_pressed) { out.close(); out2.close(); if (pDataArray->trim) { out3.close(); } inFASTA.close(); delete chimera; return 1; } @@ -314,18 +316,18 @@ static DWORD WINAPI MySlayerThreadFunction(LPVOID lpParam){ } - count++; + pDataArray->count++; } delete candidateSeq; //report progress - if((count) % 100 == 0){ pDataArray->m->mothurOut("Processing sequence: " + toString(count)); pDataArray->m->mothurOutEndLine(); } + if((pDataArray->count) % 100 == 0){ pDataArray->m->mothurOut("Processing sequence: " + toString(pDataArray->count)); pDataArray->m->mothurOutEndLine(); } } //report progress - if((count) % 100 != 0){ pDataArray->m->mothurOut("Processing sequence: " + toString(count)); pDataArray->m->mothurOutEndLine(); } + if((pDataArray->count) % 100 != 0){ pDataArray->m->mothurOut("Processing sequence: " + toString(pDataArray->count)); pDataArray->m->mothurOutEndLine(); } pDataArray->numNoParents = chimera->getNumNoParents(); - if (pDataArray->numNoParents == count) { pDataArray->m->mothurOut("[WARNING]: megablast returned 0 potential parents for all your sequences. This could be due to formatdb.exe not being setup properly, please check formatdb.log for errors.\n"); } + if (pDataArray->numNoParents == pDataArray->count) { pDataArray->m->mothurOut("[WARNING]: megablast returned 0 potential parents for all your sequences. This could be due to formatdb.exe not being setup properly, please check formatdb.log for errors.\n"); } out.close(); out2.close();