Skip to content

Commit

Permalink
Fix errors
Browse files Browse the repository at this point in the history
  • Loading branch information
szhan committed Aug 8, 2023
1 parent 2d6347c commit 75096f1
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions python/tests/test_imputation.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,18 +226,18 @@ def get_test_data(matrix_text, par):
x = convert_to_numpy(matrix_text)
if par == "switch":
# Switch probability, one per site
return x[:, 2].reshape((4, 4))[:, 2]
return x[:, 2].reshape((4, 4))[:, 0]
elif par == "mismatch":
# Mismatch probability
return x[:, 2].reshape((4, 4))[:, 4]
# Mismatch probability, one per site
return x[:, 4].reshape((4, 4))[:, 0]
elif par == "ref_hap_allele":
# Allele in haplotype in reference panel
# 0 = ref allele, 1 = alt allele
return x[:, 2].reshape((4, 4))[:, 6]
return x[:, 6].reshape((4, 4))
elif par == "query_hap_allele":
# Allele in haplotype in query
# 0 = ref allele, 1 = alt allele
return x[:, 2].reshape((4, 4))[:, 7]
return x[:, 7].reshape((4, 4))[:, 0]
elif par == "shift":
# Shift factor
# TODO
Expand All @@ -248,6 +248,6 @@ def get_test_data(matrix_text, par):
pass
elif par == "sum":
# Sum of values over haplotypes
return x[:, 2].reshape((4, 4))[:, 10]
return x[:, 10].reshape((4, 4))[:, 0]
else:
raise ValueError(f"Unknown parameter: {par}")

0 comments on commit 75096f1

Please sign in to comment.