X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=makecontigscommand.h;h=43105b8236371f6e2feb3c09140e9b71b8e721bf;hb=4b54ce99af7db8019ea907cd7c2edf789369ada9;hp=65b365840573cde71902c153a499c07530e0a79a;hpb=f12174bc43f9e8ad536f2a37fb3a763b1ac90ba9;p=mothur.git diff --git a/makecontigscommand.h b/makecontigscommand.h index 65b3658..43105b8 100644 --- a/makecontigscommand.h +++ b/makecontigscommand.h @@ -60,7 +60,7 @@ public: private: bool abort, allFiles, createGroup; - string outputDir, ffastqfile, rfastqfile, align, oligosfile, rfastafile, ffastafile, rqualfile, fqualfile, file; + string outputDir, ffastqfile, rfastqfile, align, oligosfile, rfastafile, ffastafile, rqualfile, fqualfile, file, format; float match, misMatch, gapOpen, gapExtend; int processors, longestBase, threshold, tdiffs, bdiffs, pdiffs, ldiffs, sdiffs; vector outputNames; @@ -70,11 +70,13 @@ private: vector linker; vector spacer; vector primerNameVector; - vector barcodeNameVector; + vector barcodeNameVector; + vector convertTable; map groupCounts; map groupMap; + vector convertQual(string); fastqRead readFastq(ifstream&, bool&); vector< vector< vector > > preProcessData(unsigned long int&); vector< vector > readFileNames(string); @@ -335,6 +337,7 @@ static DWORD WINAPI MyContigsThreadFunction(LPVOID lpParam){ } if(trashCode.length() == 0){ + bool ignore = false; if (pDataArray->createGroup) { if(pDataArray->barcodes.size() != 0){ string thisGroup = pDataArray->barcodeNameVector[barcodeIndex]; @@ -350,16 +353,18 @@ static DWORD WINAPI MyContigsThreadFunction(LPVOID lpParam){ if (pDataArray->m->debug) { pDataArray->m->mothurOut(", group= " + thisGroup + "\n"); } - pDataArray->groupMap[fSeq.getName()] = thisGroup; - - map::iterator it = pDataArray->groupCounts.find(thisGroup); - if (it == pDataArray->groupCounts.end()) { pDataArray->groupCounts[thisGroup] = 1; } - else { pDataArray->groupCounts[it->first] ++; } + int pos = thisGroup.find("ignore"); + if (pos == string::npos) { + pDataArray->groupMap[fSeq.getName()] = thisGroup; + map::iterator it = pDataArray->groupCounts.find(thisGroup); + if (it == pDataArray->groupCounts.end()) { pDataArray->groupCounts[thisGroup] = 1; } + else { pDataArray->groupCounts[it->first] ++; } + }else { ignore = true; } } } - if(pDataArray->allFiles){ + if(pDataArray->allFiles && !ignore){ ofstream output; pDataArray->m->openOutputFileAppend(pDataArray->fastaFileNames[barcodeIndex][primerIndex], output); output << ">" << fSeq.getName() << endl << contig << endl;