def parse_vcf_line(line):
    """
    Parse a line in the VCF file.
    :param line: a line from the VCF file
    :type line: str
    :return: :class:`.vcf.VCFRecord`
    """
    if isinstance(line, str):
        if line.startswith('#'):
            return None
        elem = line.strip().split('\t')
    elif isinstance(line, list):
        elem = line
    try:
        quality = int(elem[5])
    except ValueError:
        try:
            quality = float(elem[5])
        except ValueError:
            quality = None
    filter_field = None
    if elem[6] != '.':
        filter_field = elem[6].split(';')
    info = elem[7]
    try:
        fmt = elem[8]
    except IndexError:
        fmt = None
    else:
        if fmt == '.':
            fmt = None
    return [elem[0], int(elem[1]), None if elem[2] == '.' else elem[2],
        elem[3], elem[4].split(','), quality, filter_field, info, fmt, elem[9:]
        ]
