예제 #1
0
    def test_bad_reads_filter_not_applied_if_one_sample_is_not_naughty(self):
        svc = SVCDriver(self)
        svc.with_var_filters("BR")
        svc.with_bad_reads_window_size(7)
        svc.with_min_bad_reads_score(13)

        svc.with_ref_sequence(
            # 1234567890123456789
            "AAAGCGTACAACCGGGTTAGTCACAAACCCGTTACGTATGCATG").with_read(
                "................G...........................",
                "         3333333 3333333                    ",
                sample_name="GOOD",
                n_rev=2,
                n_fwd=2).with_read(
                    "................G...........................",
                    "         0000000 0000000                    ",
                    sample_name="BAD",
                    n_rev=10,
                    n_fwd=10).with_read(
                        "................G...........................",
                        "         00000      0000                    ",
                        sample_name="UGLY",
                        n_rev=10,
                        n_fwd=10)

        expect = svc.call()
        vcf_expectation = expect.with_output_vcf()
        vcf_expectation.record_count(1)

        vcf_expectation \
            .has_record_for_variant(Variant(DEFAULT_CHROM, 16, "T", "G")) \
            .with_no_filters()
예제 #2
0
    def test_bad_reads_filter_not_applied_when_snp_has_high_quality_bases_nearby(
            self):
        svc = SVCDriver(self)
        svc.with_var_filters("BR")
        svc.with_bad_reads_window_size(7)
        svc.with_min_bad_reads_score(15)

        svc.with_ref_sequence(
            # 1234567890123456789
            "AAAGCGTACAACCGGGTTAGTCACAAACCCGTTACGTATGCATG").with_read(
                "................G...........................",
                "         4444444 4444444                    ",
                n_rev=10,
                n_fwd=10)

        expect = svc.call()
        vcf_expectation = expect.with_output_vcf()
        vcf_expectation.record_count(1)

        vcf_expectation \
            .has_record_for_variant(Variant(DEFAULT_CHROM, 16, "T", "G")) \
            .with_no_filters()