X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=seqsummarycommand.h;h=3926e25f3c2ebb484b357464d1514dfc957c4000;hb=ea4f373c28543cd1002b0dd7dc6e55c526647d59;hp=79e8be96974141da315d1038a51096695212ad5c;hpb=49d2b7459c5027557564b21e9487dadafbbbdc96;p=mothur.git diff --git a/seqsummarycommand.h b/seqsummarycommand.h index 79e8be9..3926e25 100644 --- a/seqsummarycommand.h +++ b/seqsummarycommand.h @@ -34,7 +34,7 @@ public: void help() { m->mothurOut(getHelpString()); } private: bool abort; - string fastafile, outputDir, namefile; + string fastafile, outputDir, namefile, countfile; int processors; vector outputNames; map nameMap; @@ -74,18 +74,18 @@ struct seqSumData { unsigned long long end; int count; MothurOut* m; - string namefile; + bool hasNameMap; map nameMap; seqSumData(){} - seqSumData(string f, string sf, MothurOut* mout, unsigned long long st, unsigned long long en, string na, map nam) { + seqSumData(string f, string sf, MothurOut* mout, unsigned long long st, unsigned long long en, bool na, map nam) { filename = f; sumFile = sf; m = mout; start = st; end = en; - namefile = na; + hasNameMap = na; nameMap = nam; count = 0; } @@ -123,11 +123,11 @@ static DWORD WINAPI MySeqSumThreadFunction(LPVOID lpParam){ if (current.getName() != "") { int num = 1; - if (pDataArray->namefile != "") { + if (pDataArray->hasNameMap){ //make sure this sequence is in the namefile, else error map::iterator it = pDataArray->nameMap.find(current.getName()); - if (it == pDataArray->nameMap.end()) { pDataArray->m->mothurOut("[ERROR]: " + current.getName() + " is not in your namefile, please correct."); pDataArray->m->mothurOutEndLine(); pDataArray->m->control_pressed = true; } + if (it == pDataArray->nameMap.end()) { pDataArray->m->mothurOut("[ERROR]: " + current.getName() + " is not in your name or count file, please correct."); pDataArray->m->mothurOutEndLine(); pDataArray->m->control_pressed = true; } else { num = it->second; } }