Exemplo n.º 1
0
def test_map_fn():
    res = poverlap('test/data/a.bed', 'test/data/b.bed', 'data/hg19.genome',
            metric='wc -l', n=20, ncpus=map)
    assert isinstance(res, basestring)
    yield check_attributes, res
    from itertools import imap
    res = poverlap('test/data/a.bed', 'test/data/b.bed', 'data/hg19.genome',
            metric='wc -l', n=20, ncpus=imap)
    assert isinstance(res, basestring)
    yield check_attributes, res
Exemplo n.º 2
0
def test_map_fn():
    res = poverlap('test/data/a.bed', 'test/data/b.bed', 'data/hg19.genome',
            metric='wc -l', n=20, ncpus=map)
    assert isinstance(res, basestring)
    yield check_attributes, res
    from itertools import imap
    res = poverlap('test/data/a.bed', 'test/data/b.bed', 'data/hg19.genome',
            metric='wc -l', n=20, ncpus=imap)
    assert isinstance(res, basestring)
    yield check_attributes, res
Exemplo n.º 3
0
def test_local():
    res = poverlap('test/data/a.bed',
                   'test/data/b.bed',
                   'data/hg19.genome',
                   shuffle_loc=100,
                   n=20)
    assert isinstance(res, basestring)
    yield check_attributes, res
Exemplo n.º 4
0
def test_string_metric():
    res = poverlap('test/data/a.bed',
                   'test/data/b.bed',
                   'data/hg19.genome',
                   metric='wc -l',
                   n=20)
    assert isinstance(res, basestring)
    yield check_attributes, res
Exemplo n.º 5
0
def test_multi_metric():
    res = poverlap('test/data/a.bed',
                   'test/data/b.bed',
                   'data/hg19.genome',
                   metric=('wc -l', mymetric),
                   n=20,
                   ncpus=2)
    assert isinstance(res, basestring)
    d = json.loads(res)
    assert len(d) == 2, d
Exemplo n.º 6
0
def test_multi_metric():
    res = poverlap('test/data/a.bed', 'test/data/b.bed', 'data/hg19.genome',
            metric=('wc -l', mymetric), n=20, ncpus=2)
    assert isinstance(res, basestring)
    d = json.loads(res)
    assert len(d) == 2, d
Exemplo n.º 7
0
def test_cpu_count():

    res = poverlap('test/data/a.bed', 'test/data/b.bed', 'data/hg19.genome',
            metric='wc -l', n=20, ncpus=2)
    assert isinstance(res, basestring)
    yield check_attributes, res
Exemplo n.º 8
0
def test_local():
    res = poverlap('test/data/a.bed', 'test/data/b.bed', 'data/hg19.genome',
            shuffle_loc=100, n=20)
    assert isinstance(res, basestring)
    yield check_attributes, res
Exemplo n.º 9
0
def test_python_metric():

    res = poverlap('test/data/a.bed', 'test/data/b.bed', 'data/hg19.genome', metric=mymetric, n=20)
    assert isinstance(res, basestring)
    yield check_attributes, res