X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=qualityscores.cpp;h=ae85d86199c3ce9fbec09aac5525b17db3c4297a;hb=59814dd1de1def2b7d162c27c21190d8f1199cba;hp=520d0bb56eae9c66a936311ca71aa5330bf29aa1;hpb=220dc345e493cddc569521111ce32ac4d965ab7f;p=mothur.git diff --git a/qualityscores.cpp b/qualityscores.cpp index 520d0bb..ae85d86 100644 --- a/qualityscores.cpp +++ b/qualityscores.cpp @@ -286,23 +286,26 @@ bool QualityScores::stripQualWindowAverage(Sequence& sequence, int stepSize, int if(seqLength < windowSize) { return 0; } - while(start < seqLength){ + while((start+windowSize) < seqLength){ double windowSum = 0.0000; for(int i=start;i= seqLength){ end = seqLength - 1; } + + if(end >= seqLength){ end = seqLength; } + } - + if(end == -1){ end = seqLength; } //failed first window