def run_metaseq():
    # set up a BamSignal object
    m = metaseq.genomic_signal(
            metaseq.example_filename('wgEncodeUwTfbsK562CtcfStdAlnRep1.bam'),
            kind='bam')

    print 'metaseq starting...',
    sys.stdout.flush()
    t0 = time.time()

    # Tweak processes and chunksize as needed to balance CPUs and I/O.
    PROCESSES = 6
    CHUNKSIZE = 100

    # the trick is to use a single bin...
    ms_array = m.array(
            windows, processes=PROCESSES, chunksize=CHUNKSIZE, bins=1)

    t1 = time.time()
    print 'completed in %.2fs' % (t1 - t0)
    sys.stdout.flush()
    return ms_array.ravel()
dataset/ETHPy150Open daler/metaseq/metaseq/test/examples/compare_coverage_bed.py/run_metaseq/original