def test_unique_filter():
    infile = gt.InputFile(testfiles["bedconvert.map"])
    filtered = gt.unique(infile, 2)
    count = 0
    for t in filtered:
        count += 1
    assert count == 1
def test_unique_filter():
    infile = gt.InputFile(testfiles["bedconvert.map"])
    filtered = gt.unique(infile, 2)
    count = 0
    for t in filtered:
        count += 1
    assert count == 1
def test_chain_filter_indirect():
    infile = gt.InputFile(testfiles["bedconvert.map"])
    filtered = gt.trim(gt.unique(infile, 2), left=10, right=10)
    count = 0
    for t in filtered:
        count += 1
        assert len(t.read) == 81
    assert count == 1
def test_chain_filter_indirect():
    infile = gt.InputFile(testfiles["bedconvert.map"])
    filtered = gt.trim(gt.unique(infile, 2), left=10, right=10)
    count = 0
    for t in filtered:
        count += 1
        assert len(t.read) == 81
    assert count == 1
def test_template_unique_filter_level():
    infile = gt.InputFile(testfiles["test.map.gz"])
    assert 1 == len([x for x in gt.unique(infile, 20)
                     ]), "Should be length 1 buyt is: " + str(
                         [x.level() for x in gt.unique(infile, 20)])
def test_template_unique_filter_level():
    infile = gt.InputFile(testfiles["test.map.gz"])
    assert 1 == len([x for x in gt.unique(infile, 20)]), "Should be length 1 buyt is: " + str(
        [x.level() for x in gt.unique(infile, 20)]
    )