def read_ghosts_from_file(ghost_file):
    """
    Read in the ghost water residue IDs from each from in the ghost file

    Parameters
    ----------
    ghost_file : str
        File containing the IDs of the ghost residues in each frame

    Returns
    -------
    ghost_resids : list
        List of lists, containing residue IDs for each frame
    """
    # Read in residue IDs for the ghost waters in each frame
    ghost_resids = []
    with open(ghost_file, 'r') as f:
        for line in f.readlines():
            ghost_resids.append([int(resid) for resid in line.split(",")])

    return ghost_resids