def filter(self):
        for name, comment, seq, qual in self.parent.filter():
            if name in self.whitelist:
                self.kept += 1
                if self.verbose:
                    sys.stderr.write('[Whitelist] %s (kept)\n' % (name,))
                yield (name, comment, seq, qual)
            else:
                if self.verbose:
                    sys.stderr.write('[Whitelist] %s (removed)\n' % (name,))
                self.removed += 1
                if self.discard:
                    self.discard(name)
dataset/ETHPy150Open ngsutils/ngsutils/ngsutils/fastq/filter.py/WhitelistFilter.filter/original