@parameterized.parameters(dict(gq_resolution=1, expecteds=[dict(start=1, end=2, ref='A', gq=53, min_dp=18), dict(start=2, end=3, ref='C', gq=56, min_dp=19), dict(start=3, end=4, ref='A', gq=0, min_dp=35), dict(start=4, end=5, ref='T', gq=0, min_dp=20), dict(start=5, end=6, ref='A', gq=0, min_dp=16), dict(start=6, end=7, ref='A', gq=72, min_dp=31), dict(start=7, end=8, ref='C', gq=83, min_dp=35), dict(start=8, end=9, ref='T', gq=59, min_dp=20), dict(start=9, end=10, ref='G', gq=56, min_dp=19)]), dict(gq_resolution=3, expecteds=[dict(start=1, end=2, ref='A', gq=53, min_dp=18), dict(start=2, end=3, ref='C', gq=56, min_dp=19), dict(start=3, end=4, ref='A', gq=0, min_dp=35), dict(start=4, end=5, ref='T', gq=0, min_dp=20), dict(start=5, end=6, ref='A', gq=0, min_dp=16), dict(start=6, end=7, ref='A', gq=72, min_dp=31), dict(start=7, end=8, ref='C', gq=83, min_dp=35), dict(start=8, end=9, ref='T', gq=59, min_dp=20), dict(start=9, end=10, ref='G', gq=56, min_dp=19)]), dict(gq_resolution=4, expecteds=[dict(start=1, end=3, ref='A', gq=53, min_dp=18), dict(start=3, end=4, ref='A', gq=0, min_dp=35), dict(start=4, end=5, ref='T', gq=0, min_dp=20), dict(start=5, end=6, ref='A', gq=0, min_dp=16), dict(start=6, end=7, ref='A', gq=72, min_dp=31), dict(start=7, end=8, ref='C', gq=83, min_dp=35), dict(start=8, end=9, ref='T', gq=59, min_dp=20), dict(start=9, end=10, ref='G', gq=56, min_dp=19)]), dict(gq_resolution=10, expecteds=[dict(start=1, end=3, ref='A', gq=53, min_dp=18), dict(start=3, end=4, ref='A', gq=0, min_dp=35), dict(start=4, end=5, ref='T', gq=0, min_dp=20), dict(start=5, end=6, ref='A', gq=0, min_dp=16), dict(start=6, end=7, ref='A', gq=72, min_dp=31), dict(start=7, end=8, ref='C', gq=83, min_dp=35), dict(start=8, end=10, ref='T', gq=56, min_dp=19)]), dict(gq_resolution=45, expecteds=[dict(start=1, end=3, ref='A', gq=53, min_dp=18), dict(start=3, end=4, ref='A', gq=0, min_dp=35), dict(start=4, end=5, ref='T', gq=0, min_dp=20), dict(start=5, end=6, ref='A', gq=0, min_dp=16), dict(start=6, end=10, ref='A', gq=56, min_dp=19)]))
def test_quantize_gvcfs(self, gq_resolution, expecteds):
    counts = [(0, 18, 'A'), (0, 19, 'C'), (35, 0, 'A'), (10, 10, 'T'), (4, 12, 'A'), (1, 30, 'A'), (1, 34, 'C'), (0, 20, 'T'), (0, 19, 'G')]
    allele_counts = self.fake_allele_counter(1, counts).summary_counts()
    caller = PlaceholderVariantCaller(0.01, 100, gq_resolution)
    gvcfs = list(caller.make_gvcfs(allele_counts))
    self.assertLen(gvcfs, len(expecteds))
    for (actual, expected) in zip(gvcfs, expecteds):
        self.assertGVCF(actual, **expected)
@parameterized.parameters(dict(gq_resolution=1, expecteds=[dict(start=1, end=2, ref='A', gq=53, min_dp=18), dict(start=2, end=3, ref='C', gq=56, min_dp=19), dict(start=3, end=4, ref='A', gq=0, min_dp=35), dict(start=4, end=5, ref='T', gq=0, min_dp=20), dict(start=5, end=6, ref='A', gq=0, min_dp=16), dict(start=6, end=7, ref='A', gq=72, min_dp=31), dict(start=7, end=8, ref='C', gq=83, min_dp=35), dict(start=8, end=9, ref='T', gq=59, min_dp=20), dict(start=9, end=10, ref='G', gq=56, min_dp=19)]), dict(gq_resolution=3, expecteds=[dict(start=1, end=2, ref='A', gq=53, min_dp=18), dict(start=2, end=3, ref='C', gq=56, min_dp=19), dict(start=3, end=4, ref='A', gq=0, min_dp=35), dict(start=4, end=5, ref='T', gq=0, min_dp=20), dict(start=5, end=6, ref='A', gq=0, min_dp=16), dict(start=6, end=7, ref='A', gq=72, min_dp=31), dict(start=7, end=8, ref='C', gq=83, min_dp=35), dict(start=8, end=9, ref='T', gq=59, min_dp=20), dict(start=9, end=10, ref='G', gq=56, min_dp=19)]), dict(gq_resolution=4, expecteds=[dict(start=1, end=3, ref='A', gq=53, min_dp=18), dict(start=3, end=4, ref='A', gq=0, min_dp=35), dict(start=4, end=5, ref='T', gq=0, min_dp=20), dict(start=5, end=6, ref='A', gq=0, min_dp=16), dict(start=6, end=7, ref='A', gq=72, min_dp=31), dict(start=7, end=8, ref='C', gq=83, min_dp=35), dict(start=8, end=9, ref='T', gq=59, min_dp=20), dict(start=9, end=10, ref='G', gq=56, min_dp=19)]), dict(gq_resolution=10, expecteds=[dict(start=1, end=3, ref='A', gq=53, min_dp=18), dict(start=3, end=4, ref='A', gq=0, min_dp=35), dict(start=4, end=5, ref='T', gq=0, min_dp=20), dict(start=5, end=6, ref='A', gq=0, min_dp=16), dict(start=6, end=7, ref='A', gq=72, min_dp=31), dict(start=7, end=8, ref='C', gq=83, min_dp=35), dict(start=8, end=10, ref='T', gq=56, min_dp=19)]), dict(gq_resolution=45, expecteds=[dict(start=1, end=3, ref='A', gq=53, min_dp=18), dict(start=3, end=4, ref='A', gq=0, min_dp=35), dict(start=4, end=5, ref='T', gq=0, min_dp=20), dict(start=5, end=6, ref='A', gq=0, min_dp=16), dict(start=6, end=10, ref='A', gq=56, min_dp=19)]))
def test_quantize_gvcfs(self, gq_resolution, expecteds):
    counts = [(0, 18, 'A'), (0, 19, 'C'), (35, 0, 'A'), (10, 10, 'T'), (4, 12, 'A'), (1, 30, 'A'), (1, 34, 'C'), (0, 20, 'T'), (0, 19, 'G')]
    allele_counts = self.fake_allele_counter(1, counts).summary_counts()
    caller = PlaceholderVariantCaller(0.01, 100, gq_resolution)
    gvcfs = list(caller.make_gvcfs(allele_counts))
    self.assertLen(gvcfs, len(expecteds))
    for (actual, expected) in zip(gvcfs, expecteds):
        self.assertGVCF(actual, **expected)