Skip to content

Commit 3465301

Browse files
committed
Add placeholder for implementing Equation 1
1 parent 2e5db7f commit 3465301

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

python/tests/test_beagle.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,24 @@ def compute_state_probability_matrix(fm, bm, ref_h, query_h, rho, mu):
312312
return (sm, fwd_hap_probs, bwd_hap_probs)
313313

314314

315+
def compute_state_probability_matrix_eqn1(fm, bm, ref_h, query_h, rho, mu):
316+
"""
317+
Implement the HMM forward-backward algorithm following Equation 1 of BB2016.
318+
319+
This is simpler than faithfully reimplementing the original BEAGLE 4.1 algorithm.
320+
321+
:param numpy.ndarray fm: Forward probability matrix.
322+
:param numpy.ndarray bm: Backward probability matrix.
323+
:param numpy.ndarray ref_h: Reference haplotypes.
324+
:param numpy.ndarray query_h: One query haplotype.
325+
:param numpy.ndarray rho: Switch probabilities.
326+
:param numpy.ndarray mu: Mismatch probabilities.
327+
:return: HMM state probability matrix.
328+
:rtype: numpy.ndarray
329+
"""
330+
pass
331+
332+
315333
def interpolate_haplotype_probability_matrix(
316334
fwd_hap_probs, bwd_hap_probs, genotyped_pos, imputed_pos
317335
):

0 commit comments

Comments
 (0)