Example #1
0
def test_generate_sample_FileNotFoundError(binop_file, sorted_binop_expected_locs):
    """If coverage file is not found, return the targets without coverage."""
    ggrp = GenomeGroup(binop_file)
    ggrp.set_coverage(coverage_file="somethingbad")

    sample = run.get_sample(ggrp, ignore_coverage=False)
    assert list(gt.loc_idx for gt in sample) == sorted_binop_expected_locs
Example #2
0
def test_generate_sample(binop_file, sorted_binop_expected_locs):
    """Sample generation from targets results in a sorted list."""
    ggrp = GenomeGroup(binop_file)
    sample = run.get_sample(ggrp, ignore_coverage=True)

    for gt in sample:
        assert gt.source_path == binop_file

    assert list(gt.loc_idx for gt in sample) == sorted_binop_expected_locs