Skip to content

Add test_imputation.py file #2802

Open
@jeromekelleher

Description

@jeromekelleher

We want to test some specific examples against the new backward matrix code in #2799. To be certain that we're interpreting the model correctly, we can output the forward and backward matrices from Beagle, and compare them with the results we get from running the local LS hmm code.

We don't want to rely on msprime simulations producing the same results over time, so what we can do is to run a small simulation, and output to text (using ts.dump_text()), storing the results in the file as examples.

Then, we run BEAGLE on these same simulations, with a few different parameter combinations and capture the forward and backward matrices, as well as the final imputation output. We can save these outputs into the file as python arrays (or text, if that's simpler). Then we compare with our own output.

We can start with a simple example, but we should try and get a few awkward corner cases in there as well.

Note that we don't currently have a sensible high-level API for the LS model in tskit, so we should wrap the low-level API in functions locally in this file, for now.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions