CWL target to retrieve block group of callable regions for parallelization.

    Uses blocking to handle multicore runs.

def get_parallel_regions_block(batch):
    """CWL target to retrieve block group of callable regions for parallelization.

    Uses blocking to handle multicore runs.
    """
    samples = [utils.to_single_data(d) for d in batch]
    regions = _get_parallel_regions(samples[0])
    out = []
    # Currently don't have core information here so aim for about 10 items per partition
    n = 10
    for region_block in tz.partition_all(n, regions):
        out.append({"region_block": ["%s:%s-%s" % (c, s, e) for c, s, e in region_block]})
    return out