def filter(self):
        for name, comment, seq, qual in self.parent.filter():
            alt = False
            while qual and qual[-1] == self.value:
                alt = True
                qual = qual[:-1]
                seq = seq[:-1]

            if alt:
                if self.verbose:
                    sys.stderr.write('[SuffixQual] %s (altered)\n' % (name,))
                self.altered += 1
                comment = '%s #suff' % comment
            else:
                if self.verbose:
                    sys.stderr.write('[SuffixQual] %s (kept)\n' % (name,))
                self.kept += 1

            yield (name, comment, seq, qual)
dataset/ETHPy150Open ngsutils/ngsutils/ngsutils/fastq/filter.py/SuffixQualFilter.filter/original