def thresholdBins(indices, counts, s_min):
    output_indices_keep = copy.copy(indices)
    for key in indices.keys():
        if counts[key] < s_min:
            output_indices_keep.pop(key)

    E.info("%s bins retained" % len(output_indices_keep.keys()))
    E.info("Just to check, the largest bin has %i subregions" %
           (max(counts.flatten())))

    return output_indices_keep
dataset/ETHPy150Open CGATOxford/cgat/scripts/data2spike.py/thresholdBins/original