def filter_subjects_by_coverage(args):
    """Check whether the subject passes the coverage filter."""

    subject, cov, SD_MEAN_CUTOFF, STRIM_5, STRIM_3 = args

    # Trim the ends
    if cov.shape[0] >= STRIM_5 + STRIM_3 + 10:
        cov = cov[STRIM_5: -STRIM_3]

    passes_filter = cov.mean() > 0 and cov.std() / cov.mean() <= SD_MEAN_CUTOFF
    return subject, passes_filter