Skip to content

Commit

Permalink
Minor refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
szhan committed Feb 25, 2024
1 parent a678be2 commit 622a54a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python/tests/beagle_numba.py
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,8 @@ def compute_individual_scores(alleles_1, allele_probs_1, alleles_2, allele_probs
ap_hap2_0 = allele_probs_2[i] if alleles_2[i] == 0 else 1 - allele_probs_2[i]
ap_hap2_1 = 1 - ap_hap2_0
gt_probs[i, 0] = ap_hap1_0 * ap_hap2_0 # P(00)
gt_probs[i, 1] = ap_hap1_0 * ap_hap2_1 + ap_hap1_1 * ap_hap2_0 # P(01 or 10)
gt_probs[i, 1] = ap_hap1_0 * ap_hap2_1 # P(01)
gt_probs[i, 1] += ap_hap1_1 * ap_hap2_0 # P(10)
gt_probs[i, 2] = ap_hap1_1 * ap_hap2_1 # P(11)
dosages[i] = gt_probs[i, 1] + 2 * gt_probs[i, 2]
return gt_probs, dosages
Expand Down

0 comments on commit 622a54a

Please sign in to comment.