astheeggeggs / lshmm

code to run Li and Stephens
MIT License
3 stars 3 forks source link

Exclude MISSING when counting alleles per site #34

Closed szhan closed 2 months ago

szhan commented 3 months ago

Fix #33

I reworked check_alleles in lshmm/api.py.

I implemented a helper function _get_num_alleles, which has the same logic as check_alleles, in the following two test files:

The above sets of tests pass.

I did not make any changes to test_LS_haploid_diploid.py, because there is no testing of FB when mutation rates are scaled by the number of distinct alleles.

Also, I'm only dealing with MISSING here. I'll add NONCOPY to the exclusion set in #31.

szhan commented 2 months ago

Is this okay? If so, then perhaps we could merge it before I do some refactoring?

astheeggeggs commented 2 months ago

Sure, will merge