def filter(self):
        for name, comment, seq, qual in self.parent.filter():
            quals = self._convert_quals(qual)  # convert from phred to int[]
            yielded = False
            for i in xrange(len(qual) - self.window_size):
                acc = 0.0
                for q in quals[i:i + self.window_size]:
                    acc += q

                if (acc % self.window_size) < self.min_qual:  # truncate here
                    self.altered += 1
                    yielded = True
                    if self.verbose:
                        sys.stderr.write('[Qual] %s (altered) (idx:%s)\n' % (name, i))

                    if len(seq) == len(qual):  # basespace or colorspace w/o prefix
                        yield(name, '%s #qual' % comment, seq[:i + self.window_size - 1], qual[:i + self.window_size - 1])
                    else:
                        yield(name, '%s #qual' % comment, seq[:i + self.window_size], qual[:i + self.window_size - 1])
                    break

            if not yielded:
                self.kept += 1
                if self.verbose:
                    sys.stderr.write('[Qual] %s (kept)\n' % (name,))
                yield (name, comment, seq, qual)
dataset/ETHPy150Open ngsutils/ngsutils/ngsutils/fastq/filter.py/QualFilter.filter/operator `/` -> `%`