astheeggeggs / lshmm

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

Fix get examples for diploid case #44

Closed szhan closed 1 month ago

szhan commented 1 month ago

Fix #43

szhan commented 1 month ago

For now, it should raise an error when using the including ancestors option, because it is not correctly implemented yet.

szhan commented 1 month ago

I suspect that there is a bug as well, because the tests fail when a query has only MISSING, which should work.

szhan commented 1 month ago

It turns out that there is no bug as suspected above. It's just that one of the tests ran into a pathological case where both the mutation rate and recombination rate are very low (1e-6) and there is no normalisation, resulting in comparisons of extremely low log-likelihood values (nearly 1e-15).

As discussed with @astheeggeggs , one way around this is to run all the tests on the non-extreme parameter value combinations, so as to avoid comparisons of extremely low LL values; then, proceed to run the tests on the extreme parameter value combinations with normalisation.

szhan commented 1 month ago

The above should be fixed in a separate issue.

szhan commented 1 month ago

Also, for now, the tests are not covering cases when the ref. panel contains partial ancestral haplotypes with NONCOPY.