Skip to content

Commit

Permalink
WIP: Dosage scores
Browse files Browse the repository at this point in the history
  • Loading branch information
szhan committed Feb 25, 2024
1 parent dc22529 commit 53e2fd7
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 @@ -613,14 +613,15 @@ def compute_genotype_probs(alleles_1, allele_probs_1, alleles_2, allele_probs_2)
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, 2] = ap_hap1_1 * ap_hap2_1 # P(11)
# dose[i] = gt_probs[i, 1] + gt_probs[i, 2]
return gt_probs


def compute_dosage_scores(alleles_1, allele_probs_1, alleles_2, allele_probs_2):
"""
Compute dosage scores at ungenotyped positions of an individual.
In BEAGLE 4.1 output, DS: "Estimated ALT dose [P(RA) + P(AA)".
In BEAGLE 4.1 output, DS: "Estimated ALT dose [P(RA) + P(AA)]".
:param numpy.ndarray alleles_1: Imputed alleles for haplotype 1.
:param numpy.ndarray allele_probs_1: Imputed allele probabilities for haplotype 1.
Expand Down

0 comments on commit 53e2fd7

Please sign in to comment.