def get_fasta_size_from_faifile(infile):
    """
    Get chromosome size from .fai file

    .fai format:
        chr1	248956422	112	70	71
        chr2	242193529	252513167	70	71
        chr3	198295559	498166716	70	71
        chr4	190214555	699295181	70	71
        chr5	181538259	892227221	70	71
        chr6	170805979	1076358996	70	71
    """

    fa = {}
    chrom_order_list = []
    with open(infile) as I:
        for r in I:
            col = r.strip().split()
            fa[col[0]] = int(col[1])
            chrom_order_list.append(col[0])

    return chrom_order_list, fa