def __init__(self, line):
assert not line.startswith('<STR_LIT:#>')<EOL>fields = line.rstrip().split('<STR_LIT:\t>')<EOL>try:<EOL><INDENT>self.CHROM = fields[<NUM_LIT:0>]<EOL>self.POS = int(fields[<NUM_LIT:1>]) - <NUM_LIT:1><EOL>self.ID = fields[<NUM_LIT:2>]<EOL>self.REF = fields[<NUM_LIT:3>]<EOL>self.ALT = fields[<NUM_LIT:4>].split('<STR_LIT:U+002C>')<EOL>self.QUAL = fields[<NUM_LIT:5>]<EOL>self.FILTER = set() if fields[<NUM_LIT:6>] == '<STR_LIT:.>' else set(fields[<NUM_LIT:6>].split('<STR_LIT:;>'))<EOL>INFO = fields[<NUM_LIT:7>]<EOL><DEDENT>except:<EOL><INDENT>raise Error('<STR_LIT>' + line)<EOL><DEDENT>try:<EOL><INDENT>self.QUAL = float(self.QUAL)<EOL><DEDENT>except:<EOL><INDENT>self.QUAL = None<EOL><DEDENT>self.INFO = {}<EOL>if INFO != '<STR_LIT:.>':<EOL><INDENT>info_fields = INFO.split('<STR_LIT:;>')<EOL>for field in info_fields:<EOL><INDENT>if '<STR_LIT:=>' in field:<EOL><INDENT>key, value = field.split('<STR_LIT:=>')<EOL>self.INFO[key] = value<EOL><DEDENT>else:<EOL><INDENT>self.INFO[field] = None<EOL><DEDENT><DEDENT><DEDENT>if len(fields) == <NUM_LIT:10>:<EOL><INDENT>FORMAT = fields[<NUM_LIT:8>]<EOL>FORMAT_VALS = fields[<NUM_LIT:9>]<EOL>self.format_keys = FORMAT.split('<STR_LIT::>')<EOL>format_vals = FORMAT_VALS.split('<STR_LIT::>')<EOL>self.FORMAT = dict(zip(self.format_keys, format_vals))<EOL><DEDENT>else:<EOL><INDENT>self.format_keys = self.FORMAT = None<EOL><DEDENT>
Constructs VcfRecord from a line of a VCF file.
        Assumes only one sample in the file