def pass_min_coverage(dp, i, min_coverage, cov_metric):
    """
    if the DP flag does not meet minimum coverage, toss it.
    if the DP4 flag does not meet minimum coverage, toss it.
    :param dp:
        DP coverage allele depth
    :param i: string
        DP4 coverage allele depth
    :param min_coverage: int
        minimum coverage required (anything less will return False)
    :param cov_metric: string
        either 'DP' or 'DP4'
    :return passed: boolean
        True if the coverage is at least min_coverage, false otherwise.
    """
    i = i.split(',')
    if (cov_metric == 'DP') and (int(dp) < min_coverage):
        return False
    elif (cov_metric == 'DP4') and ((int(i[0]) + int(i[2]) + int(
            i[1]) + int(i[3])) < min_coverage):
        return False

    return True