def get_logfc_mmm_matrix(df, alpha=0.05):
    """
    For each gene, get the logfc median absolute deviation (MAD), max, and
    median values across treatments.
    """
    # Significance filter
    sig = df["padj"] <= alpha

    # Filter by significance, group by gene, and aggregate
    # log2foldchange by mad, max and median statistics
    mmm_df = (
        df[sig]
        .groupby(["gene"])
        .agg({"log2foldchange": ["mad", "max", "median"]})
    )

    return mmm_df