popsim-consortium / stdpopsim

A library of standard population genetic models
GNU General Public License v3.0
126 stars 87 forks source link

bug in adding mutations to the recapitated portion of the tree sequence #1496

Open mufernando opened 1 year ago

mufernando commented 1 year ago

We will have a similar issue that pyslim had to deal with because of the time in the metadata from SLiM tree sequences.

https://github.com/popsim-consortium/stdpopsim/blob/5f319a5bbe4f0ffa3be8ce235307f662008eab7e/stdpopsim/slim_engine.py#L1813

See https://github.com/tskit-dev/pyslim/pull/308#issuecomment-1592070514 and https://github.com/tskit-dev/pyslim/pull/311 for the fix

nspope commented 1 year ago

Gosh, thanks for noticing-- in this case, it's affecting the mutations and not the genealogies, right?

mufernando commented 1 year ago

I don't think it does and @petrelharp agrees. He found this bug btw!

petrelharp commented 1 year ago

And hence very minor - it just results in no mutations for 1 or 2 generations, I think.

andrewkern commented 1 year ago

@mufernando or @petrelharp will one of you submit a patch?