Beispiel #1
0
 def test_unsupported_genotype_likelihood(self):
   variantcall = variants_pb2.VariantCall(genotype_likelihood=[-1, -2, -3])
   with self.assertRaisesRegexp(NotImplementedError,
                                'only supports haploid and diploid'):
     variant_utils.genotype_likelihood(variantcall, [0, 1, 1])
Beispiel #2
0
 def test_genotype_likelihood(self, gls, allele_indices, expected):
   variantcall = variants_pb2.VariantCall(genotype_likelihood=gls)
   actual = variant_utils.genotype_likelihood(variantcall, allele_indices)
   self.assertEqual(actual, expected)