Skip to content

Commit 75096f1

Browse files
committed
Fix errors
1 parent 2d6347c commit 75096f1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

python/tests/test_imputation.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -226,18 +226,18 @@ def get_test_data(matrix_text, par):
226226
x = convert_to_numpy(matrix_text)
227227
if par == "switch":
228228
# Switch probability, one per site
229-
return x[:, 2].reshape((4, 4))[:, 2]
229+
return x[:, 2].reshape((4, 4))[:, 0]
230230
elif par == "mismatch":
231-
# Mismatch probability
232-
return x[:, 2].reshape((4, 4))[:, 4]
231+
# Mismatch probability, one per site
232+
return x[:, 4].reshape((4, 4))[:, 0]
233233
elif par == "ref_hap_allele":
234234
# Allele in haplotype in reference panel
235235
# 0 = ref allele, 1 = alt allele
236-
return x[:, 2].reshape((4, 4))[:, 6]
236+
return x[:, 6].reshape((4, 4))
237237
elif par == "query_hap_allele":
238238
# Allele in haplotype in query
239239
# 0 = ref allele, 1 = alt allele
240-
return x[:, 2].reshape((4, 4))[:, 7]
240+
return x[:, 7].reshape((4, 4))[:, 0]
241241
elif par == "shift":
242242
# Shift factor
243243
# TODO
@@ -248,6 +248,6 @@ def get_test_data(matrix_text, par):
248248
pass
249249
elif par == "sum":
250250
# Sum of values over haplotypes
251-
return x[:, 2].reshape((4, 4))[:, 10]
251+
return x[:, 10].reshape((4, 4))[:, 0]
252252
else:
253253
raise ValueError(f"Unknown parameter: {par}")

0 commit comments

Comments
 (0)