X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;ds=sidebyside;f=pcrseqscommand.h;h=45ce6f3f153e6020f00c859b1928cc1d74ea2a55;hb=82723a54e6109e2d46d84c10e87727cebd5a18ea;hp=03092bca2a70da8428e77f5599e6ab200c2b8960;hpb=e41b86a600fe30f5df9507d7e55027e7b8bd7dd6;p=mothur.git diff --git a/pcrseqscommand.h b/pcrseqscommand.h index 03092bc..45ce6f3 100644 --- a/pcrseqscommand.h +++ b/pcrseqscommand.h @@ -315,11 +315,11 @@ static DWORD WINAPI MyPcrThreadFunction(LPVOID lpParam){ pDataArray->m->mothurOut("[ERROR]: seqs are not the same length as ecoli seq. When using ecoli option your sequences must be aligned and the same length as the ecoli sequence.\n"); pDataArray->m->control_pressed = true; break; }else { if (pDataArray->keepdots) { - currSeq.filterToPos(start); - currSeq.filterFromPos(end); + currSeq.filterToPos(pDataArray->start); + currSeq.filterFromPos(pDataArray->end); }else { - string seqString = currSeq.getAligned().substr(0, end); - seqString = seqString.substr(start); + string seqString = currSeq.getAligned().substr(0, pDataArray->end); + seqString = seqString.substr(pDataArray->start); currSeq.setAligned(seqString); } } @@ -331,17 +331,17 @@ static DWORD WINAPI MyPcrThreadFunction(LPVOID lpParam){ if (pDataArray->end != -1) { if (pDataArray->end > currSeq.getAligned().length()) { pDataArray->m->mothurOut("[ERROR]: end is longer than your sequence length, aborting.\n"); pDataArray->m->control_pressed = true; break; } else { - if (pDataArray->keepdots) { currSeq.filterFromPos(end); } + if (pDataArray->keepdots) { currSeq.filterFromPos(pDataArray->end); } else { - string seqString = currSeq.getAligned().substr(0, end); + string seqString = currSeq.getAligned().substr(0, pDataArray->end); currSeq.setAligned(seqString); } } } if (pDataArray->start != -1) { - if (pDataArray->keepdots) { currSeq.filterToPos(start); } + if (pDataArray->keepdots) { currSeq.filterToPos(pDataArray->start); } else { - string seqString = currSeq.getAligned().substr(start); + string seqString = currSeq.getAligned().substr(pDataArray->start); currSeq.setAligned(seqString); } }