X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=seqsummarycommand.h;h=3926e25f3c2ebb484b357464d1514dfc957c4000;hb=006601d68abe8d0061f77e8d28323b160750e343;hp=d8837a374d070298ceb9d224aaf8c621680bf249;hpb=0caf3fbabaa3ece404f8ce77f4c883dc5b1bf1dc;p=mothur.git diff --git a/seqsummarycommand.h b/seqsummarycommand.h index d8837a3..3926e25 100644 --- a/seqsummarycommand.h +++ b/seqsummarycommand.h @@ -25,6 +25,7 @@ public: vector setParameters(); string getCommandName() { return "summary.seqs"; } string getCommandCategory() { return "Sequence Processing"; } + string getOutputFileNameTag(string, string); string getHelpString(); 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 +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; @@ -73,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; } @@ -122,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; } }