def get_hap_vals(hap_hits, hap_vals, _type):
    """Returns list of haplotype name or frequency values
       for a given variant, using the boolean array and
       list of possible values"""
    haps = []
    for i, hap_hit in enumerate(hap_hits):
        if hap_hit:
            if _type is float:
                haps.append(100 * _type(hap_vals[i]))
            else:
                haps.append(_type(hap_vals[i]))
    return haps