def detection_poobah(poobah_df, pval_cutoff):
    """ given a dataframe of p-values with sample_ids in columns and probes in index,
    calculates the percent failed probes per sample. Part of QC report."""
    out = {}
    for sample_id in poobah_df.columns:
        total = poobah_df.shape[0]
        failed = poobah_df[sample_id][poobah_df[sample_id] >= pval_cutoff
            ].count()
        percent_failed = round(100 * failed / total, 1)
        out[sample_id] = percent_failed
    return out
