Skip to content

Commit

Permalink
Update API functions
Browse files Browse the repository at this point in the history
  • Loading branch information
szhan committed Jul 1, 2024
1 parent 34e356d commit 0044769
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lshmm/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ def forwards(
emission_matrix,
prob_recombination,
norm=normalise,
emission_func=core.get_emission_probability_haploid,
)

return forward_array, normalisation_factor_from_forward, log_lik
Expand Down Expand Up @@ -279,6 +280,7 @@ def backwards(
emission_matrix,
normalisation_factor_from_forward,
prob_recombination,
emission_func=core.get_emission_probability_haploid,
)

return backwards_array
Expand Down Expand Up @@ -313,6 +315,7 @@ def viterbi(
query_checked,
emission_matrix,
prob_recombination,
emission_func=core.get_emission_probability_haploid,
)
best_path = backwards_viterbi_hap(num_sites, V, P)
else:
Expand All @@ -323,6 +326,7 @@ def viterbi(
query_checked,
emission_matrix,
prob_recombination,
emission_func=core.get_emission_probability_diploid,
)
unphased_path = backwards_viterbi_dip(num_sites, V, P)
best_path = get_phased_path(num_ref_haps, unphased_path)
Expand Down Expand Up @@ -365,6 +369,7 @@ def path_loglik(
query_checked,
emission_matrix,
prob_recombination,
emission_func=core.get_emission_probability_haploid,
)

return log_lik

0 comments on commit 0044769

Please sign in to comment.