X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=seqsummarycommand.h;h=c4e6131524d9c64b4496df7f9d5d34a315e6b34e;hb=367747fb506bf228d3b2d645868d275ba0714e90;hp=d8837a374d070298ceb9d224aaf8c621680bf249;hpb=43ed0accfbc2852849e104ff7eccdd2c42acd4ec;p=mothur.git diff --git a/seqsummarycommand.h b/seqsummarycommand.h index d8837a3..c4e6131 100644 --- a/seqsummarycommand.h +++ b/seqsummarycommand.h @@ -25,7 +25,9 @@ public: vector setParameters(); string getCommandName() { return "summary.seqs"; } string getCommandCategory() { return "Sequence Processing"; } + string getHelpString(); + string getOutputPattern(string); string getCitation() { return "http://www.mothur.org/wiki/Summary.seqs"; } string getDescription() { return "summarize the quality of sequences in an unaligned or aligned fasta file"; } @@ -33,7 +35,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; @@ -73,18 +75,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; } @@ -122,11 +124,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; } }