def next(self):
def _alt(alt):<EOL><INDENT>"""<STR_LIT>"""<EOL>if not alt:<EOL><INDENT>return '<STR_LIT:.>'<EOL><DEDENT>else:<EOL><INDENT>return str(alt)<EOL><DEDENT><DEDENT>if not self._next:<EOL><INDENT>row = next(self.reader)<EOL>alternate_alleles = list(map(_alt, row.ALT))<EOL>for allele in alternate_alleles:<EOL><INDENT>self._next.append(<EOL>self.row_to_dict(<EOL>row,<EOL>allele=allele,<EOL>alternate_alleles=alternate_alleles))<EOL><DEDENT>self._line_number += <NUM_LIT:1><EOL><DEDENT>return self._next.pop()<EOL>
Expands multiple alleles into one record each
using an internal buffer (_next).