You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For epochs the idea would be to make sure the demes are "equal" in the examples below, by checking equality of sizes (and other attributes) over the demes' lifetimes rather than mandating equal numbers of epochs each with equal attribute values. The below example is obvious from visual inspection, but if you do the same with exponentially-changing epochs its less obvious! I haven't really thought through the best way of achieving this. Maybe take the union of each deme's epoch end times and split epochs for each deme at all the time points? Or instead of splitting epochs, just check deme sizes for a few (5?) evenly spaced times in each interval.
msprime to_demes()/from_demes() round trip tests. Hypothesis can generate examples with consecutive epochs (or migrations) that have identical parameters. These are merged during conversion back and forth (which is reasonable).
demes-slim tests demes sizes are set correctly by running a simulaiton and printing deme sizes in each generation. It's fairly easy to parse this output in python and construct a new demes graph, where each deme has 1 epoch per generation (deduplicated slightly, for consecutive epochs of constant-size). It would be easiest to just do a graph equality check at this point.
For epochs the idea would be to make sure the demes are "equal" in the examples below, by checking equality of sizes (and other attributes) over the demes' lifetimes rather than mandating equal numbers of epochs each with equal attribute values. The below example is obvious from visual inspection, but if you do the same with exponentially-changing epochs its less obvious! I haven't really thought through the best way of achieving this. Maybe take the union of each deme's epoch end times and split epochs for each deme at all the time points? Or instead of splitting epochs, just check deme sizes for a few (5?) evenly spaced times in each interval.
And similarly for comparing migrations, the following three examples should be "equal". We could just compare resulting migration matrices here.
The text was updated successfully, but these errors were encountered: