def ACF_brute(df_cov, lag):
    """ Brute force calculate the ACF from coverage data

        Args:
            df_cov: a dataframe of coverage data
            lag:    the lag for which to calculate the ACF
    """
    # Assign columns and index
    df_cov.columns = ['chrom', 'pos', 'depth']
    df_cov.index = df_cov.pos

    # Normalize the depth
    df_cov.depth = df_cov.depth / df_cov.depth.mean()

    # Brute force find the positons that are $lag distance apart
    df_lag = df_cov.loc[df_cov.pos+lag, :].dropna()
    df_start = df_cov.loc[df_lag.pos-lag, :]

    # Calc ACF
    n = len(df_lag)
    mu_lag = df_lag.depth.mean()
    mu_start = df_start.depth.mean()

    ACF = (1. / n) * ((df_lag.depth - mu_lag) * (df_start.depth - mu_start)).sum()

    return ACF