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

    .fai format:
        1       249250621       52      60      61
        2       243199373       253404903       60      61
        3       198022430       500657651       60      61
        4       191154276       701980507       60      61
        5       180915260       896320740       60      61
        6       171115067       1080251307      60      61
    """

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

    return fa