def generate_filename_base(experience):
    """Generate the base of the filename (without the id of the fov).

    :param experience: dict
        Dictionary with metadata bout the directory (gene, author, use of
        puromycin, paper where the data is analyzed, other use of drugs, batch,
        directory).

    :return:

    filename_base : str
        Base of the filename used to save the output.

    """
    gene = experience["gene"]
    author = experience["author"]
    if author is None:
        author_str = "unknown"
    else:
        author_str = author
    puro = experience["puro"]
    if puro:
        puro_str = "puro"
    else:
        puro_str = "nopuro"
    paper = experience["paper"]
    other = experience["other"]
    if other is None:
        other_str = "nodrug"
    else:
        other_str = other
    batch = experience["batch"]
    filename_base = "{0}_{1}_{2}_{3}_{4}_{5}".format(
        gene, author_str, puro_str, paper, other_str, batch)

    return filename_base