def __init__(self, filename, sample=None):
super(VCFIterator, self).__init__(filename)<EOL>row = six.next(self.filename).strip()<EOL>self.vcf_file = structure.VCFFile(filename)<EOL>self.inum=<NUM_LIT:0><EOL>while row[:<NUM_LIT:2>] == '<STR_LIT>':<EOL><INDENT>if row.startswith('<STR_LIT>'):<EOL><INDENT>assert(self.vcf_file.add_info(row)==True)<EOL><DEDENT>elif row.startswith('<STR_LIT>'):<EOL><INDENT>assert(self.vcf_file.add_filter(row))<EOL><DEDENT>elif row.startswith('<STR_LIT>'):<EOL><INDENT>assert(self.vcf_file.add_format(row))<EOL><DEDENT>elif row.startswith('<STR_LIT>'):<EOL><INDENT>assert(self.vcf_file.add_contig(row))<EOL><DEDENT>elif row.startswith('<STR_LIT>'):<EOL><INDENT>assert(self.vcf_file.add_alt(row))<EOL><DEDENT>elif row.startswith('<STR_LIT>'):<EOL><INDENT>assert(self.vcf_file.add_extra(row))<EOL><DEDENT>row = six.next(self.filename).strip()<EOL><DEDENT>assert(self.vcf_file.add_header(row))<EOL>self.sample = sample<EOL>
An iterator over the VCF file format

        This reads VCF files and has been tested on VCF 4.0.
        The returned items are VCFEntry