def meta2idx(current_idxs, meta_per_dataset):
    """

    Map meta information of a dataset to the indexes of its samples in the full data.

    Parameters
    ----------
        current_idxs: list of list of integers
            each sublist corresponds to list of index of cells in each dataset
        meta_per_dataset: list of list of strings
            each sublist in the form of ['animal_id', 'bregma'] for each dataset

    Returns
    -------
        meta2idx: dictionary
            key as ['animal_id', 'bregma'], value as the start and end index + 1 of the samples in the full data

    """
    meta2idx = dict.fromkeys(meta_per_dataset)
    idx_start = 0
    idx_end = 0

    for i in range(len(current_idxs)):
        current_idx = current_idxs[i]
        current_meta = meta_per_dataset[i]
        idx_end += len(current_idx)
        meta2idx[current_meta] = [idx_start, idx_end]
        idx_start = idx_end

    return meta2idx