コード例 #1
0
ファイル: haplotypes.py プロジェクト: zuxfoucault/deepvariant
  def scaled_likelihoods(self):
    """Returns the scaled likelihood of each genotype."""
    if not all(bool(x) for x in self._genotype_likelihood_containers):
      raise ValueError(
          'All genotypes must have some probability mass: {}'.format(
              self._genotype_likelihood_containers))

    return genomics_math.normalize_log10_probs([
        genomics_math.log10sumexp(unscaled)
        for unscaled in self._genotype_likelihood_containers
    ])
コード例 #2
0
 def test_log10sumexp(self, log10_probs, expected):
   self.assertAlmostEqual(genomics_math.log10sumexp(log10_probs), expected)
コード例 #3
0
 def test_log10sumexp(self, log10_probs, expected):
   self.assertAlmostEqual(genomics_math.log10sumexp(log10_probs), expected)