X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=trimseqscommand.h;h=957f37a65bfb1c177f000c9c6d031ddfc3784c81;hb=01f8d2c7d982a6209211f5abbcf2a086fdf60d0a;hp=ba4e61411b8498820139e8ae2b1ed71cb37b0432;hpb=e0ce7cbc93d7d2fbb753ca694182db092a0ea0e7;p=mothur.git diff --git a/trimseqscommand.h b/trimseqscommand.h index ba4e614..957f37a 100644 --- a/trimseqscommand.h +++ b/trimseqscommand.h @@ -27,6 +27,7 @@ public: vector setParameters(); string getCommandName() { return "trim.seqs"; } string getCommandCategory() { return "Sequence Processing"; } + string getOutputFileNameTag(string, string); string getHelpString(); string getCitation() { return "http://www.mothur.org/wiki/Trim.seqs"; } string getDescription() { return "provides the preprocessing features needed to screen and sort pyrosequences"; } @@ -413,11 +414,13 @@ static DWORD WINAPI MyTrimThreadFunction(LPVOID lpParam){ outGroupsFile << currSeq.getName() << '\t' << thisGroup << endl; + int numRedundants = 0; if (pDataArray->nameFile != "") { map::iterator itName = pDataArray->nameMap.find(currSeq.getName()); if (itName != pDataArray->nameMap.end()) { vector thisSeqsNames; pDataArray->m->splitAtChar(itName->second, thisSeqsNames, ','); + numRedundants = thisSeqsNames.size()-1; //we already include ourselves below for (int k = 1; k < thisSeqsNames.size(); k++) { //start at 1 to skip self outGroupsFile << thisSeqsNames[k] << '\t' << thisGroup << endl; } @@ -425,8 +428,8 @@ static DWORD WINAPI MyTrimThreadFunction(LPVOID lpParam){ } map::iterator it = pDataArray->groupCounts.find(thisGroup); - if (it == pDataArray->groupCounts.end()) { pDataArray->groupCounts[thisGroup] = 1; } - else { pDataArray->groupCounts[it->first]++; } + if (it == pDataArray->groupCounts.end()) { pDataArray->groupCounts[thisGroup] = 1 + numRedundants; } + else { pDataArray->groupCounts[it->first] += (1 + numRedundants); } } }