コード例 #1
0
def test_get_strands_lumpy(lumpy, bnd):
    bnd[0]["id"] = "_1"
    p = vcf_sv_parser.SV_vcf(lumpy, caller="lumpy")
    mate1, mate2 = p._get_mates(bnd)
    strand1, strand2 = p._get_strands(mate1, mate2)
    assert strand1 == "+"
    assert strand2 == "-"
コード例 #2
0
def test_filter_low_qual_calls_lumpy_filtered(lumpy):
    p = vcf_sv_parser.SV_vcf(lumpy, caller="lumpy")
    records = p._parse_vcf()
    record = [list(next(p._group_bnds(records)))]
    record[0][0]["filter"] = "LOW_QUAL"
    filt_records = list(p._filter_low_qual_calls(record))
    assert filt_records == []
コード例 #3
0
def test_filter_low_qual_calls_non_svaba_filtered(svaba):
    p = vcf_sv_parser.SV_vcf(svaba, caller="svaba")
    records = p._parse_vcf()
    record = [list(next(p._group_bnds(records)))]
    record[0][0]["filter"] = "LOW_QUAL"
    record[0][1]["filter"] = "LOW_QUAL"
    filt_records = list(p._filter_low_qual_calls(record))
    assert filt_records == []
コード例 #4
0
def test_get_strands_lumpy_unmatched(lumpy, bnd):
    bnd[0]["id"] = "_1"
    bnd[0]["STRANDS"] = bnd[1]["STRANDS"]
    p = vcf_sv_parser.SV_vcf(lumpy, caller="lumpy")
    mate1, mate2 = p._get_mates(bnd)
    assert _raises_correct_error(p._get_strands,
                                 mate1,
                                 mate2,
                                 expected_error=AssertionError)
コード例 #5
0
def test_filter_low_qual_calls_svaba_unfiltered(svaba):
    p = vcf_sv_parser.SV_vcf(svaba, caller="svaba")
    records = p._parse_vcf()
    record = [list(next(p._group_bnds(records)))]
    filt_records = list(p._filter_low_qual_calls(record))
    assert record[0][0] == filt_records[0][0]
コード例 #6
0
def test_filter_low_qual_calls_lumpy_unfiltered(lumpy):
    p = vcf_sv_parser.SV_vcf(lumpy, caller="lumpy")
    records = p._parse_vcf()
    record = [list(next(p._group_bnds(records)))]
    filt_records = list(p._filter_low_qual_calls(record))
    assert record[0][0] == filt_records[0][0]
コード例 #7
0
def test_get_mates_reversed_svaba(svaba, bnd):
    bnd[0]["id"] = ":2"
    matched = vcf_sv_parser.SV_vcf(svaba, caller="svaba")._get_mates(bnd)
    assert bnd[0] == matched[1]
    assert bnd[1] == matched[0]
コード例 #8
0
def test_get_mates_reversed_gridss(gridss, bnd):
    bnd[0]["id"] = "_2"
    matched = vcf_sv_parser.SV_vcf(gridss, caller="gridss")._get_mates(bnd)
    assert bnd[0] == matched[1]
    assert bnd[1] == matched[0]
コード例 #9
0
def test_get_mates_reversed_lumpy(lumpy, bnd):
    bnd[0]["id"] = "_2"
    matched = vcf_sv_parser.SV_vcf(lumpy, caller="lumpy")._get_mates(bnd)
    assert bnd[0] == matched[1]
    assert bnd[1] == matched[0]
コード例 #10
0
def test_bnd_matched(lumpy, bnd):
    matched = next(
        vcf_sv_parser.SV_vcf(lumpy, caller="lumpy")._group_bnds(bnd))
    assert isinstance(matched, tuple)