Skip to content

Commit 976977b

Browse files
committed
refactor: standardise biallelic diplotypes to count ref allele and handle missing calls
1 parent ab9ee71 commit 976977b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

malariagen_data/anoph/snp_data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2040,7 +2040,7 @@ def _biallelic_diplotypes(
20402040
# with missing calls coded as -127.
20412041
gt = allel.GenotypeDaskArray(ds["call_genotype"].data)
20422042
with self._dask_progress(desc="Compute biallelic diplotypes"):
2043-
gn = gt.to_n_alt().compute()
2043+
gn = gt.to_n_ref().compute()
20442044
# Code missing calls as -127.
20452045
missing = np.all(ds["call_genotype"].values == -1, axis=2)
20462046
gn[missing] = -127

0 commit comments

Comments
 (0)